Couldn't able to get ["LOGON_USER"] after configuring web application to use IIS server

I created a C#.Net web application using VS 2010 and .Net 3.5.I configured the application to use IIS web server by setting the application web properties.I am running the visual studio as adminstrator.
When I compiled the application it is giving the error here.It could n't able to retrieve the LOGONUSER.
    string strDomainUsr = HttpContext.Current.Request.ServerVariables["LOGON_USER"].ToString();

It is working fine when I run the application at ASP.Net development server.

How to get the ["LOGON_USER"] when the application run at IIS.

Is something related to IIS configuration.
Please let me know what all the changes I need to make.

Thanks
KavyaVSAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
This problem occurs because the authentication-related variables in the ServerVariables collection are not populated if you use Anonymous Access security to access the .aspx page. This problem can also occur if you give the Anonymous user access in the <authorization> section of the Web.config file.

Please check the following link:

http://support.microsoft.com/kb/306359 source
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.