Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User.Identity when logon is Administrator

Status
Not open for further replies.

MColeman

Programmer
Sep 23, 2002
242
My VB/ASP.Net application is not letting the administrator run it.

I am using User.IsInRole to check to see if the user is setup in the correct group. I have added administrator to both, but User.IsInRole is still false.

In debug mode, I checked User.Identity when logged on as administrator. The system showed:

User.Identity
Auth type = ""
IsAuthenticated = False
Name: = ""

Does anyone know if I'm logged on as administrator, does the user information not get passed back to the application?
 
Apologies if this is a bit obvious but you have got basic Authentication turned off in IIS and Windows Authentication tuirned on for the website?

If not go into IIS, find your website and right click for properties then select the Directory Security tab. Next click the Edit button and setup the access as above.

Rob

Go placidly amidst the noise and haste, and remember what peace there may be in silence - Erhmann 1927
 
For the Default Web Site and my application, both have Anonymous access checked and Integrated Windows Authentication checked.

Do I have this set right?
 
You will need to uncheck Anonymous access to get the windows authentication to work. Otherwise whenever someone browses to your application IIS uses the MACHINENAME_IUSER account rather than their own authenticated windows account to identify them. This is really aimed at public websites and hence no user details are available at the server. Uncheck anonymous access and your problems should be solved.

Rob

Go placidly amidst the noise and haste, and remember what peace there may be in silence - Erhmann 1927
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top