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
 
Joined
Aug 8, 2006
Messages
3
Reaction score
0
I've the same problem

HI all,

I've the same problem, too. But, even I use User.Identity.Name, still can't work. I've tried nearly all the methods, can anyone tell me how to solve the problem. I cannot get a user name for the logged on user.

Molly
 

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

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top