Last post Apr 05, 2017 06:09 AM by Chris Zhao
Apr 03, 2017 05:15 PM|jslist|LINK
There's 2 apps that upload files. Both have been running fine. Files were able to be uploaded. I uploaded a file through it 3 days ago and it worked. This morning it comes up with an error: "Access to the path 'D:\....." is denied."
It's happening write at this code line
FileUpload1.SaveAs(thisSaveServer + savePath)
I looked at the code for thisSaveServer and savePath and it looks good -hasn't changed
Here's the weird thing. There's 1 IIS server and 4 webs on it. 2 Webs for testing (A & B) 2 webs for production (C & D)
In each case Web B uploads to Web A and Web D uploads to Web C. A Virtual Directory is used in each case.
Production (Web D->C) works great
Testing Web(B->A) gives me an error.
I copied the file from Production to Testing and got the same error. So it's not the code.
I look at the permissions and they are identical. IIS_MACHINENAME has full control
For the application pools identity they are using ApplicationPoolIdentity
Any ideas on where I could investigate and find what's happening? Talked to the server guys and they said they didn't change anything.
Apr 03, 2017 06:07 PM|kaushalparik27|LINK
Try by providing appropriate (preferably full) access rights to IIS_IUSRS & IUSR to folders to which uploading the file gives you "Permission Denied" error.
Apr 05, 2017 06:09 AM|Chris Zhao|LINK
To fix this you will need to change the security permissions on the appropriate directories. Specifically, ASP.NET requires read, execute, and list access for the ASPNET account for the web site root (for example: c:\inetpub\wwwroot or any alternative site
directory you may have configured in IIS), the content directory and the application root directory in order to monitor for configuration file changes.
To add permissions to a directory, perform the following steps: