troubleshooting Question 4 FileUpload gets "Permission Denied" when Uploading file

Avatar of JS List
JS ListFlag for United States of America asked on
ASP.NETMicrosoft IIS Web Server
8 Comments1 Solution692 ViewsLast Modified:

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

Here's something new: I was able to upload 1 file and not the other.  These are all pdfs.  When I opened the pdf files on the server -  go to properties -> Details -> The one that wouldn't upload says Owner = Administrators.  The one that did upload says Owner = App Pool Identity name.

When I open the pdfs on my desktop that were uploaded they both have me as the owner.

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.

Dan McFadden
Technical Lead - Active Directory

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros