Ask a Question related to ASP.NET Security, Design and Development.
-
Joe Kaplan \(MVP - ADSI\) #1
Re: Why won't WindowsPrincipal show as IUSR_<machine> ?
It will be IUSER_MACHINE if you leave anonymous turned on in IIS AND enable
impersonation in your web.config.
Joe K.
"Odie" <Odie@discussions.microsoft.com> wrote in message
news:0256388A-CFC3-4929-9D88-4AA8B0CE72BD@microsoft.com...identity of the asp.net thread:> 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 Windowsprinted out:> -=-=
> WindowsIdentity MyIdentity = WindowsIdentity.GetCurrent();
> WindowsPrincipal MyPrincipal = new WindowsPrincipal(MyIdentity);
> string Name = MyPrincipal.Identity.Name;
> string Type = MyPrincipal.Identity.AuthenticationType;
> string Auth = MyPrincipal.Identity.IsAuthenticated.ToString();
> //Identity values.
> string IdentName = MyIdentity.Name;
> string IdentType = MyIdentity.AuthenticationType;
> string IdentIsAuth = MyIdentity.IsAuthenticated.ToString();
> string ISAnon = MyIdentity.IsAnonymous.ToString();
> -=-=
>
> When I have IIS Security set to [anon + integrated security], my test pagestill prints out exactly the same thing! Then I remembered asp.net has it's> Principal Name: MYMACHINE\ASPNET
> Principal Type: NTLM
> Principal IsAuthenticated: True
> Identity IsAnonymous: False
> Identity IsGuest: False
> Identity IsSystem: False
>
> This is good.
> But when I removed integrated security from IIS Security tab my test page
own stuff in web.config, so I changed:there's some weird caching going on here, I shut down my web server and ran> <authentication mode="Windows" />
> to
> <authentication mode="None" />
>
> I still get exactly the same output from my test page! Just in case
IISRESET - still to no avail.expect it to be IUSR_MYMACHINE). But I don't understand why it insists on>
> I can sort of understand the PrincipalName=ASPNET (even though I would
having IsAuthenticated=True and IsAnonymous=False.>
> ??
>
Joe Kaplan \(MVP - ADSI\) Guest
-
WindowsPrincipal.IsInRole() is Being Flaky. Help!!
Its just being inconsistent. I'm in 3 different Groups in AD. ..IsInRole("Groupx") returns true ..IsInRole("Groupy") returns true... -
isinrole reverts to windowsprincipal?
I'm trying to assign all roles (AD and custom pulled from SQL Table) to users when they login to the app using Windows Authentication. The code... -
CurrentPrincipal, WindowsPrincipal
Hello Friend Please check following Cod Dim x As System.Security.Principal.WindowsPrincipa x = System.Threading.Thread.CurrentPrincipa... -
IUSR_ Account - Is It Built In To ASP For File Access
Does ASP only use the IUSR_<IIS Machine Name> to gain access to files located on a LAN, or can another user account name and password be setup? ... -
Role empty in WindowsPrincipal
Hello. I have a test system with one Win2003 server as a domain controller and one WinXP client. The domain has been setup and the WinXP client... -
Joe Kaplan \(MVP - ADSI\) #2
Re: Why won't WindowsPrincipal show as IUSR_<machine> ?
Good question. Remind me again which user is showing properties? I've
never used mode="None" before so I don't know how that is supposed to
behave.
Joe K.
"Odie" <Odie@discussions.microsoft.com> wrote in message
news:6CE029C1-5BB3-4FD4-BC56-F3B4AC119DBA@microsoft.com...I have authentication mode="none" ?> Okay... but why is IsAuthenticated=True and IsAnonymous=False even thoughenable>
>
> "Joe Kaplan (MVP - ADSI)" wrote:
>> > It will be IUSER_MACHINE if you leave anonymous turned on in IIS ANDpage> > impersonation in your web.config.
> >
> > Joe K.
> >
> > "Odie" <Odie@discussions.microsoft.com> wrote in message
> > news:0256388A-CFC3-4929-9D88-4AA8B0CE72BD@microsoft.com...> > identity of the asp.net thread:> > > 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> > > -=-=
> > > WindowsIdentity MyIdentity = WindowsIdentity.GetCurrent();
> > > WindowsPrincipal MyPrincipal = new WindowsPrincipal(MyIdentity);
> > > string Name = MyPrincipal.Identity.Name;
> > > string Type = MyPrincipal.Identity.AuthenticationType;
> > > string Auth = MyPrincipal.Identity.IsAuthenticated.ToString();
> > > //Identity values.
> > > string IdentName = MyIdentity.Name;
> > > string IdentType = MyIdentity.AuthenticationType;
> > > string IdentIsAuth = MyIdentity.IsAuthenticated.ToString();
> > > string ISAnon = MyIdentity.IsAnonymous.ToString();
> > > -=-=
> > >
> > > When I have IIS Security set to [anon + integrated security], my testpage> > printed out:> > > Principal Name: MYMACHINE\ASPNET
> > > Principal Type: NTLM
> > > Principal IsAuthenticated: True
> > > Identity IsAnonymous: False
> > > Identity IsGuest: False
> > > Identity IsSystem: False
> > >
> > > This is good.
> > > But when I removed integrated security from IIS Security tab my testit's> > still prints out exactly the same thing! Then I remembered asp.net hasran> > own stuff in web.config, so I changed:> > there's some weird caching going on here, I shut down my web server and> > > <authentication mode="Windows" />
> > > to
> > > <authentication mode="None" />
> > >
> > > I still get exactly the same output from my test page! Just in caseon> > IISRESET - still to no avail.> > expect it to be IUSR_MYMACHINE). But I don't understand why it insists> > >
> > > I can sort of understand the PrincipalName=ASPNET (even though I would> > having IsAuthenticated=True and IsAnonymous=False.> >> > >
> > > ??
> > >
> >
> >
Joe Kaplan \(MVP - ADSI\) Guest



Reply With Quote

