Why doesn't WindowsPrincipal show as IUSR_<machine>?
From: Odie (Odie_at_discussions.microsoft.com)
Date: 06/25/04
- Next message: jains: "Re: security"
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: Verify User Group from ASP.NET"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 25 Jun 2004 08:45:04 -0700
I have a test harness set up to explore some .Net security stuff.
I have an .aspx page w/ .cs code-behind that gets the current Windows identity of the asp.net thread:
WindowsIdentity MyIdentity = WindowsIdentity.GetCurrent();
WindowsPrincipal MyPrincipal = new WindowsPrincipal(MyIdentity);
When I had IIS set to [anon + integrated security], my test page printed out:
Principal Name: MYMACHINE\ASPNET
Principal Type: NTLM
Principal IsAuthenticated: True
Identity IsAnonymous: False
Identity IsGuest: False
Identity IsSystem: False
This was good.
But when I removed integrated security from IIS Security tab my test page still prints out exactly the same thing! Then I remembered asp.net has it's own stuff in web.config, so I changed:
<authentication mode="Windows" />
to
<authentication mode="None" />
I still get exactly the same output from my test page! Just in case there's some weird caching going on here, I shut down my web server and ran IISRESET - still to no avail.
What I'm expecting to see is the PrincipalName=IUSR_MYMACHINE and IsAnonymous=True.
Anyone?
- Next message: jains: "Re: security"
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: Verify User Group from ASP.NET"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|