Anyonmous access site under an NT account

  • Thread starter Thread starter Eric Sabine
  • Start date Start date
E

Eric Sabine

In my web site, I have some features that require NT permissions. For
example, one action the user will take uses HTMLInputFile to save a file to
another server, another action will do an Active Directory query (ADSI).
Both of these will require the user to be seen as an NT account, so I
created an NT account of which will be able to query active directory
because he is a member of it and will be able to save files to that NTFS
folder. The web site is a virtual directory and I can set up the security
account with anonymous access, but using this NT account. but in my app if I
do this.

Response.Write("getcurrent" +
System.Security.Principal.WindowsIdentity.GetCurrent.Name.ToString)
I see MYCOMPUTERNAME\ASPNET
I would like it to say DOMAIN\MYNTACCOUNT

When I added to web.config this line --> <identity impersonate="true"
userName="domain\NewNTaccount" password="12345" />

I then get
Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET Files\asrsfiletransfer\a8591554\1eb427a7\hash.web" is denied.

I don't want to use NT authentication to get to the web page, it should
allow anonymous. Any ideas to get it to "act" like the NT account?

Thank you,
Eric
 
The domain user that you are going to impersonate as must have at least the
same permissions as the aspnet user on the webserver. So, you must grant at
least read/ permissions to c:\windows\microsoft.net\Framework directory or
else temp files will not be created, etc etc etc...

HTH,
Bill P.
 
On your web server, give DOMAIN\MYNTACCOUNT the same permissions that ASPNET
has in the folder "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET Files".

DOMAIN\MYNTACCOUNT needs to access this location in order to act as the
default asp.net user.
 
Of course.... Thanks Bill and "e"

Eric


Bill Priess said:
The domain user that you are going to impersonate as must have at least the
same permissions as the aspnet user on the webserver. So, you must grant at
least read/ permissions to c:\windows\microsoft.net\Framework directory or
else temp files will not be created, etc etc etc...

HTH,
Bill P.
if
 
Back
Top