Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Security (http://www.velocityreviews.com/forums/f62-asp-net-security.html)
-   -   impersonation problem (http://www.velocityreviews.com/forums/t769105-impersonation-problem.html)

ulrik@pragmasoft.dk 11-10-2006 03:44 PM

impersonation problem
 
I want to save a file to another computer (via an UNC / mapped network
drive) from an ASP.NET 1.1 application running on win xp iis 6.0. I
have created an ASPNET account on the remote machine and given this
account permissions to write to the folder and I'm able to write the
file if I have the following in my web.config:
<identity impersonate="true" userName="ASPNET" password="1234"/>
....but if I remove this (and use the default impersonation) it fails...
eventhough I've set the password of the aspnet account (on the machine
im trying to write from) to 1234 (under computer administration ->
Accounts). WindowsIdentity.GetCurrent().Name returns "ASPNET" so it
impersonates correct so I think it uses another password... I've read
that this must be set in the machine.config, but this does'nt help. Is
there another place where I have to set the password of the ASPNET
account or....?


ulrik@pragmasoft.dk 11-10-2006 05:33 PM

Re: impersonation problem
 
I found the solution...
If af set username=ASPNET and password=1234 in the machine.config and I
have an ASPNET user account on both machines with the password 1234 and
I restart IIS after making these changes (very important (-:), then it
works without the entry in the web.config.

ulrik@pragmasoft.dk skrev:
> I want to save a file to another computer (via an UNC / mapped network
> drive) from an ASP.NET 1.1 application running on win xp iis 6.0. I
> have created an ASPNET account on the remote machine and given this
> account permissions to write to the folder and I'm able to write the
> file if I have the following in my web.config:
> <identity impersonate="true" userName="ASPNET" password="1234"/>
> ...but if I remove this (and use the default impersonation) it fails...
> eventhough I've set the password of the aspnet account (on the machine
> im trying to write from) to 1234 (under computer administration ->
> Accounts). WindowsIdentity.GetCurrent().Name returns "ASPNET" so it
> impersonates correct so I think it uses another password... I've read
> that this must be set in the machine.config, but this does'nt help. Is
> there another place where I have to set the password of the ASPNET
> account or....?




All times are GMT. The time now is 08:29 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.