Exception when ASP.NET attempts to delete network file.

Posted by Jordan Terrell on Stack Overflow See other posts from Stack Overflow or by Jordan Terrell
Published on 2009-02-13T20:16:36Z Indexed on 2010/06/12 9:13 UTC
Read the original article Hit count: 388

Filed under:
|
|
|
|

Greetings - I've got an ASP.NET application that is trying to delete a file on a network share. The ASP.NET application's worker process is running under a domain account (confirmed this by looking in TaskManager and by using ShowContexts2.aspx¹). I've been assured by the network admins that the process account is a member of a group that has Modify permissions to the directory that contains the file I'm trying to delete. However, it is unable to do so, and instead I get an exception (changed the file path to all x's):

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.UnauthorizedAccessException: Access to the path '\xxxxxxx\xxxxxxx\xxxxxxx\xxxxxx.xxx' is denied.

Any ideas on how to diagnose/fix this issue?

Thanks - Jordan

¹ http://www.leastprivilege.com/ShowContextsNET20Version.aspx

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about security