Author: victtim | Posted on: 12/19/2009 9:14:02 AM | Views : 604

Hi Everyone,
I have a WCF service which provides some information based on the end-user's Windows Login ID.  The service exposes an end-point which uses Windows authentication.  Subsequently, instead of passing the UserID as a parameter to a operation contract, I can find out who invoked a service operation by looking at the context information as shown below:
WindowsIdentity id = ServiceSecurityContext.Current.WindowsIdentity;
This works fine for Windows Desktop Clients.  It also works well for ASP.NET Clients as long as the web app is configured for Windows Authentication AND Impersonation is turned ON.


However, some of the WCF's clients are ASP.NET apps which do NOT use Windows Integrated Authentication.  Instead, they use other mechanisms, such as SiteMinder.  In these cases, the above code would return the ID under which the web application runs (i.e. ASPNET user account ...

Go to the complete details ...