Impersonation problem

M

Marc Wuergler

Hi !

I'm trying to secure my web application using impersonation within the
web.config file as follows :

<identity impersonate="true"
userName="MyMachine\MyUser"
password="MyPassword" />

This gives me the error : Access to
"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\webtests\5586467f\285b6247\hash.web" denied ...

If I do the same using a user of the domain, then it works ...

<identity impersonate="true"
userName="MyDomain\DomainUser"
password="MyPassword" />

Any idea about what I'm doing wrong ?


Of course, once this is working, I'm planning to encrypt this using
aspnet_setreg.exe and the following web.config entry :
<identity impersonate="true"
userName="registry:HKLM\SOFTWARE\MyApp\identity\ASPNET_SETREG,userName"
password="registry:HKLM\SOFTWARE\MyApp\identity\ASPNET_SETREG,password" />

Again ... this works with my domain user, but not with the local user
defined on my machine. By the way, my local user has full control on the web
application folder

Thanks for your help
 
R

Raterus

The user you are impersonating with doesn't have access to "C:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net files", you must give them NTFS permissions to access this directory.
 
M

Marc Wuergler

Thanks a lot ... it works fine now
"Raterus" <[email protected]> a écrit dans le message de
The user you are impersonating with doesn't have access to
"C:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net files", you
must give them NTFS permissions to access this directory.
 

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,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top