Cannot get User.Identity.Name

G

Guest

Hello:

I am running IIS 6.0 on a Windows 2003 Server (Standard). I have a simple
webpage to display the User.Identity Name

<HTML>
<%=User.Identity.Name%>
</HTML>

I checked IIS Manager and under Directory Security, Enable Anonymous Access
is checked.

But the above property results in an empty string.

What am I doing wrong?

Thanks.
 
P

Peter Rilling

If anonymous is turned on, how do you expect the server to know who is
logged in? Anonymous is just that "anonymous", meaning, no user identity.
 
G

Guest

I solved the issue!

If Anonymous access is allowed, the User.Identity Name will always be an
empty string. Otherwise it returns the user's login name.

venki
 
P

Pat

Unless you need Anonoymous logon if not uncheck it an allow Windows
Integrated..
Patrick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top