Hammad : IDotNetWizard

My .NET Blog

Why Context.User.Identity.Name returns blank ?

One of my friends mailed on our INETA User Group mailing list asking that he is unable to recieve the name associated with Windows Identity object in his asp.net web application. He further claimed that he had set "authentication mode" to "windows authentication".

Following was my response to that:

check that if the current user is authenticated or not. u may try this if block:

if(this.Context.User.Identity.IsAuthenticated)


and if u come to know that the user is not authenticated (which i am sure u will find) then this means that like most of us u have enabled anonymous access. try disabling it and then run ur code by selecting windows authentication mode in your directory security settings in IIS.

 

Comments

TrackBack said:

Why Context.User.Identity.Name returns blank ? ooeess
# June 1, 2005 9:48 PM

hammad said:

test
# June 22, 2005 12:22 AM

TrackBack said:

Why Context.User.Identity.Name returns blank ? ooeess
# July 22, 2005 6:59 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)