RequestSecurityToken using windows credentials and .net 4.5 WIF RequestSecurityToken using windows credentials and .net 4.5 WIF asp.net asp.net

RequestSecurityToken using windows credentials and .net 4.5 WIF


Well - This is actually not trivial. You need to do Kerberos impersonation and delegation for that.

First of all impersonation. You need to call Impersonate() on the WindowsIdentity you get from Thread.CurrentPrincipal.

You can make sure you are impersonating by calling WindowsIdentity.GetCurrent. This identity must point to the client then (as opposed to the server identity).

Then while impersonating you need to make the WS-Trust request. This is most probably not allowed by default. So you network admin needs to configure delegation for the sever identity to the STS.