Last post Jun 08, 2008 05:42 PM by johram
Jun 08, 2008 03:04 PM|margbarje|LINK
I've a web application I depployed in windows server 2003. I'm trying to get the logged user name. For that I use "Page.User.Identity.Name". When I execute from VS2008, I can get the user name. But when I put the application in the IIS directory, and I run
the application by http://localhost/.... , "Page.User.Identity.Name", returns a blank string, the same for clients trying to reach the server remotely.
I tried to deselect "Enable anonymous access", but the I get the following error:
"You are not authorized to view this page".
What should I do, in order to get the name of the logged user of the active directory.
Thanks in advance
Jun 08, 2008 05:42 PM|johram|LINK
You need to uncheck anonymous access AND put a check next to "Integrated security" NTLM. If you only uncheck anonymous then nobody will be able to access the web. Checking integrated security means that your windows/domain account will automatically be used
for authentication - just like when you run in VS.