Saturday, March 24, 2012

Permission denied

Me again :)

I'm trying to delete a file and getting this:

System.UnauthorizedAccessException: Access to the path "C:/inetpub/wwwroot/appdata/photos/" is denied.

I have identity impersonate="false" and the ASPNET account has full rights for the folder.
The app is running on a remote server.

Any ideas? I'm getting frustrated here.

Thanks,

DavidAre you sure the application pool that your app is running on is using the ASPNET user account to run? Make sure its not the IISWPG user (or any other user for that matter). If your remote box is running Windows 2003, I bet that is the issue..
Thanks Sharbel, if IIS_WPG is a problem, what is the correct configuration for the application pool identity? This is an intranet server on an internal network.

David
Well, it's not that it's 'incorrect', it's just that you might be giving the ASPNET user permission, but it's the IIS_WPG that needs it.

0 comments:

Post a Comment