WCF: Windows authentication and streaming support

Issue: We had a requirement to use STREAMING protocol along with WINDOWS AUTHENTICATION. Out of the box configuration:                 Above binding configuration will not help us here and we will end up seeing below error. Error Message: $exception {“HTTP request streaming cannot be used in conjunction with HTTP…

0

WIF: Fetch SAML tokens from IssuedToken* endpoint for backend service call

Recently, I have across a scenario where the requirement is to fetch token from “IssuedToken*” active ADFS endpoints. Once application has the token from “IssuedToken*” endpoint, it would have to present the token to backend WCF service application operation invokes. We went through a lot of hardship to figure out the right binding and ADFS…


WS/WCF: Remove Server Header

Requirement: Need to suppress all instances of the HTTP ‘Server’ header from all HTTP responses including invalid requests that never even reach the application process. Why we need this: Exposing Server headers as part of response payload is security vulnerability documented under https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html section 14.38. Workaround for Self Host WCF Services: Set below registry flag…

0

WIF: Active authentication against “usernamemixed” ADFS endpoint

Scenario One of my customers recently wanted to help write code/ configuration in the following scenario. ASP.NET web application and WCF service would be hosted on two different machines (IIS web server). User would access web application. And, it would make an “active authentication” call to “usernamemixed” ADFS endpoint. Once it has the token from…


Recovering COM+ Applications from a hang state

Recently, I worked with some customer problems where they encountered issues with COM+ application going into a hang state. This causes sometimes the main applications to wait indefinitely without recovering from the problem. In such circumstances, many users/developers of the com+ application manually check the state of the com+ application in the component services page…


AF: AppFabric Invalid Version Error

On a clustered environment when you try to start the AppFabric caching service you may encounter the error AppFabric Invalid Version Error. You will see the following exception logged in the AppFabric event logs AppFabric Caching service crashed with exception {Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode<ERRService0001>:SubStatus<ES0001>:Service initialization failed. No user action required. —> Microsoft.Fabric.Common.OperationCompletedException: Operation completed with an exception…


CryptoConfig is not able to identify HashPbkdf2 from the machine.config file, which is set as: <cryptoClass PKDF2Hashing="HashPbkdf2,…

To know more about CryptoConfig please refer to https://msdn.microsoft.com/en-us/library/system.security.cryptography.cryptoconfig(v=vs.110).aspx It’s a class that accesses the cryptography configuration information. Please refer to https://blogs.msdn.microsoft.com/shawnfa/2008/12/02/cryptoconfig/ to know more on CryptoConfig. Recently I encountered an issue where a customer was implementing his own HashPbkdf2 class that does the SHA256 hashing based on Password-Based Key Derivation Function 2. A theoritical…

0

PBKDF2 .Net API does not exists with SHA256 implementation. Here PBKDF2 stands for “Password-Based Key Derivation Function 2”.

PBKDF2 .Net API does not exists with SHA256 implementation. This is true and we know that we have the Rfc2898DeriveBytes class which implements password-based key derivation functionality, PBKDF2, by using a pseudo-random number generator based on HMACSHA1. However PBKDF2 can be implemented using SHA256, SHA384, SHA512 by using the CNG API’s. See below for an…

0

WCF: Consume WCF REST service by HttpClient

In a recent case, one of my customers requested how to consume the WCF REST Service by taking the help of System.Net.Http.HttpClient modules (introduced in .NET 4.5). I hope the following details would help in depth.   Create a new WCF service application project named “RestService” WCF REST service contract appears as the following. namespace…


WCF: Support for Wild Card Host Header at IIS 10 and above

IIS 10 came with new feature to support Wild Card Host Headers. https://docs.microsoft.com/en-us/iis/get-started/whats-new-in-iis-10/wildcard-host-header-support Does WCF support it? WCF does not support this and still need to be configured in old way by creating multiple IIS binding for desired host headers. Error we might see when browsing the WCF service: The protocol binding ‘X.X.X.X:80:*.XYZ.com’ is not…

0