Why is access to the path denied?

前端 未结 29 1459
刺人心
刺人心 2020-11-22 15:25

I am having a problem where I am trying to delete my file but I get an exception.

if (result == \"Success\")
{
     if (FileUpload.HasFile)
     {
         t         


        
29条回答
  •  攒了一身酷
    2020-11-22 16:06

    I had the exact error when deleting a file. It was a Windows Service running under a Service Account which was unable to delete a .pdf document from a Shared Folder even though it had Full Control of the folder.

    What worked for me was navigating to the Security tab of the Shared Folder > Advanced > Share > Add.

    I then added the service account to the administrators group, applied the changes and the service account was then able to perform all operations on all files within that folder.

提交回复
热议问题