Make sure that you have configured the Impersonation. This is required to get the client identity.
http://msdn2.microsoft.com/en-us/library/xh507fc5.aspx
In your web.config enable impersonation.
<configuration> <system.web> <identity impersonate="true"/> </system.web> </configuration>
Use the following property to access the name of the impersonated user.
String username = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
Let me know if this works for you.
- Vipul
|