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
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.