WindowsIdentity & HttpContext.Current.User ?

From: nono (azaz@azaz.com)
Date: 11/04/02


From: "nono" <azaz@azaz.com>
Date: Mon, 4 Nov 2002 09:03:00 -0800


Hello,

I create a ASP.NET web application with these settings :

Allow anonymous access (IIS) --> DISABLE

<authentication mode="Windows" />
<identity impersonate="false"/>

<processModel enable="true" userName="machine"
password="AutoGenerate"/>

So, i read that "HttpContext .Current .User .Identity" was
an instance of WindowsIdentity. (in my case of windows
authentification)

My problem is that the 2 values are different :

WindowsIdentity.GetCurrent().Name = "DEV\ASPNET"
HttpContext .Current .User .Identity.Name
= "DEV\administrator"

Why ?

What is the difference
between "Thread.CurrentPrincipal.Identity.Name"
and "WindowsIdentity.GetCurrent().Name" ?

In my application, i would like to upload a file on the
server, and i have always the same error message :
System.UnauthorizedAccessException: Access to the
path "c:\Temp" is denied.
DEV\administrator has Read/Write credentials on this
directory, ASPNET too.

Thanks,



Relevant Pages

  • Re: Access denied
    ... No, Anonymous access is disabled, Integrated Windows authentication is ... It's unlikely that restarting the machine would have changed the IIS ... Pls check ur iis settings. ...
    (microsoft.public.sharepoint.portalserver)
  • Re: User.IsInRole is always FALSE
    ... By default this would be ASPNET on IIS 5.0. ... application to run under a different account in IIS. ... >> WindowsIdentity windowsIdentity = ... >>> Microsoft Certified Application Developer ...
    (microsoft.public.dotnet.security)
  • RE: OWA 440 login timeout
    ... this issue is related with the anonymous access on ... the Exchweb virtual directory. ... please restart your IIS service and test your issue again. ... PLEASE NOTE the newsgroup SECURE CODE and PASSWORD were ...
    (microsoft.public.windows.server.sbs)
  • Re: adding a new site results in iis error 401.1
    ... it means that the username/password you configured in IIS for the ... The reason you can get a 401.1 for anonymous access is this -- when you ... In general, the other authentication methods are pretty fast, unless your ...
    (microsoft.public.inetserver.iis)
  • Re: Persmission Denied
    ... has only been possible running the asp page directly on my test IIS ... >is your IIS virtual dir set up to use anonymous access? ... strUserDN, objUser ...
    (microsoft.public.scripting.wsh)