View Single Post
Old October 20th, 2007, 03:50 PM
Maxxim Maxxim is offline
Friend of Wrox
Join Date: Mar 2006
Location: , , Portugal.
Posts: 310
Thanks: 0
Thanked 0 Times in 0 Posts
Default Get my Anonymous username or userID


In my webconfig file I have:
<anonymousIdentification cookieless="AutoDetect" enabled="true"/>
I don't want to define any others properties for anonymous...
But I saw in aspnet_membership and aspnet_users table that my system save the userid and the username of anonymous users...
How can I get the Anounymous UserName ?

I think one of them (UserID or Username) will be stored in cookies...
How can I get this values?

I tried this:
userName = HttpContext.Current.User.Identity.Name

But, of course this only work for registered users...

Thanks very much!