Identity impersonate not working

  • Thread starter Thread starter David C
  • Start date Start date
D

David C

I was testing impersonation on a web site and added the line below to my
web.config file. Now it fails with the message The current identity
(DOMAIN01\LegalWeb) does not have write access to
'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.


The line I added was
<identity impersonate="true" userName="DOMAINLT\LegalWeb" password="" />

Thanks.
David
 
I was testing impersonation on a web site and added the line below to my
web.config file. Now it fails with the message The current identity
(DOMAIN01\LegalWeb) does not have write access to
'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.

The line I added was
<identity impersonate="true" userName="DOMAINLT\LegalWeb" password="" />

Thanks.
David

Why do you think it's not working? It says that the LegalWeb does not
have a write access. Usually, ASP.Net is running under ASP.Net
account. It means impersonation is working (but your user has no write
access).
 
But if I log into the domain as that user I get the web application to
display just fine. I am new to impersonation so I don't fully understand
it. Thanks.

David
 
Try running, from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ :

aspnet_regiis -ga DOMAIN01\LegalWeb

That will give that account the permissions it needs.



Juan
====
 
But if I log into the domain as that user I get the web application to
display just fine. I am new to impersonation so I don't fully understand
it. Thanks.

I think in this case you don't have that line in the web.config

<identity impersonate="true" />

and the site is running under default account (impersonation is
disabled by default). Therefor you don't get an error.

More about impersonation

http://support.microsoft.com/kb/306158
http://msdn2.microsoft.com/en-us/library/xh507fc5.aspx
 
Thank you. What about Juan's suggestion?

This will grant the permission to write to the Temporary ASP.NET Files
folder and access to the IIS Metabase. You can also set write
permissions directly on the folder (Right Click on the Temporary
ASP.NET Files folder and select Properties - Security...)
 
Back
Top