Re: authentication problem



Hi,

Impersonation means that further resource access would happen under the account you impersomate as, not by the process identity (NETWORK SERVICE in IIS 6.0 usually).If you enable anonymous access, you naturally get "" because there's no authentication in that case.

Perhaps following article helps in understanding: http://msdn.microsoft.com/msdnmag/issues/05/09/SecurityBriefs/default.aspx


--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net


"Keith" <kstay1@xxxxxxxxxxxx> wrote in message news:1179425977.457764.108060@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am a newbie so I hope this is an easy one. I have an asp.NET app
(.NET 2.0) using windows auth. I am just trying to get the username
of the logged-in user (I mean their windows login, exchange 5.5 with
active directory). My AD domain is called "US" and my login is
"kstay"

So, my web.config file says <authentication mode="Windows" />, and I
am using the following 2 calls:
Context.User.Identity.Name.ToString
Context.User.Identity.AuthenticationType

They works fine in development environment on my machine, they return
"US\kstay" and "NTLM" respectively. Thats' what I want to happen!

THE PROBLEM is when I move it to my test server (win 2k3, IIS6) the
two calls return "USkstay" (no slash in between) and "Negotiate"
respectively.

If I add <identity impersonate="True" /> to my web.config, it seems to
make no difference.

If I check "Enable anonymous access" in the website properties of IIS,
the two calls return "" and "" respectively.

Please help! Am i using the wrong calls? Wrong settings? Wrong
web.config params?


.



Relevant Pages

  • Re: aspnet vs IUSR_COMPUTERNAME
    ... IUSER_COMPUTERNAME (the anonymous user account) will show up on your thread ... Impersonation will impersonate the current logged on user, ... is the anonymous user account when the user did not authenticate via IIS. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: ConnectComputer after SP1
    ... It turned out that SP1 deleted most of its content. ... Make sure only the "Enable Anonymous access" is checked. ... Capture a screen shot for the error message and send it to the Newsgroup. ...
    (microsoft.public.windows.server.sbs)
  • OWA 440 Login Timeout
    ... IUSR user. ... I unchecked it and restarted IIS ... IUSR user back then unchecked the enable anonymous access box. ... Login Timeout" when I try to browse to ...
    (microsoft.public.exchange.admin)
  • Re: Login Screen
    ... If you want this site to be available to everyone without using usernames ... and passwords you will need to enable Anonymous access. ... IIS and open properties of the site (e.g. ... Anonymous access is enabled here. ...
    (microsoft.public.windows.server.general)
  • Re: Newbie Hello World Authentication Issue
    ... Check that IIS Anonymous access is enabled, ... in the IIS Admin, select properties, then Directory Security tab, then ... "Enable Anonymous access". ...
    (microsoft.public.dotnet.framework.aspnet.security)