Monday, November 14, 2011

How to get current Windows Logon user if authentication mode in web.config is set to Forms in MVC?


Request.ServerVariables["LOGON_USER"]

References:
IIS 7.0 Two-Level Authentication with Forms Authentication and Windows Authentication
http://mvolo.com/blogs/serverside/archive/2008/02/11/IIS-7.0-Two_2D00_Level-Authentication-with-Forms-Authentication-and-Windows-Authentication.aspx

Mixing Forms and Windows Security in ASP.NET
http://msdn.microsoft.com/en-us/library/ms972958.aspx

No comments:

Post a Comment