Permissions needed for user to upload file to an App_Data subfolder

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?
 
M

Mark Fitzpatrick

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
 
P

Paul Shapiro

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top