Permissions needed for user to upload file to an App_Data subfolder

  • Thread starter Thread starter Paul Shapiro
  • Start date Start date
P

Paul Shapiro

I saw a recent note here that user file uploads should be directed to a
subfolder of App_Data to avoid site recompilation each time a file is
uploaded. That worked fine on my development machine, but when I deployed to
a test site at my web host, it fails:
Access to the path '...\App_Data\PDFFiles\Filename.pdf' is denied.

How do I set permissions to allow writing a file into that folder? Is this
something I do in my page or site configuration, or do I need to contact the
web hosting company?
 
This is usually done through the web host or their control panel. IIS is
giving the error because the directory permissions set don't enable the
ASP.Net (or sometimes another account such as Network Services depending
upon the windows server version) user account to write to the directory. So
yes, you'll need to start with the host. There may be an automated way to do
this in the control panel so check there first.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression
 
Thank you Mark. Folder permissions were not accessible in the web host's
control panel. I sent an email request and they added the permissions for
the web account. It's working now.
 
Back
Top