CodeCloudy

Azure | .Net | JQuery | Javascript | Umbraco

The following exception was thrown: Access to the path denied. Exception details: System.UnauthorizedAccessException: Access to the path

on January 17, 2017

According to File.Delete Method…

An UnauthorizedAccessException means one of 4 things:

  1. The caller does not have the required permission.
  2. The file is an executable file that is in use.
  3. Path is a directory.
  4. Path specified a read-only file.

Other answers:

Try setting the access permissions to “Full control” for the .Net user from where you are reading/saving the files. You need to find out from the application pool for the website what is the identity it is running under (by default this is Application Pool Identity) and grant that the correct permissions.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: