Anyonmous access site under an NT account

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
 
B

Bill Priess

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.
 
E

e

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.
 
E

Eric Sabine

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top