Friday, 15 April 2011

current.user.identity.name is null intermittently -


I am developing ASP.NET web application using VS 2008. I am using Windows authentication. I am trying to capture the current username from HttpContext.Current.User.Identity.Name . It works perfectly on the development system After deploying the environment to the Test Environment (Windows Server 2008 R2), we see that HttpContext.Current.User.Identity.Name is redundant < Code> & lt; After rejecting users = "?" & Gt; , I "401 - Unauthorized: Access is denied due to invalid credentials." Intermittently

IIS
anonymous authentication - disabled
Windows authentication - enabled

web.config

  & lt; Authentication mode = "Windows" /> & Lt; Authority & gt; & Lt; Deny users = "?" / & Gt; & Lt; / Authorization & gt;  

Any help would be appreciated.


No comments:

Post a Comment