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
"Paul Shapiro" <paul@.hideme.broadwayData.com> wrote in message
news:%23PwJ2hmgIHA.4396@.TK2MSFTNGP04.phx.gbl...
>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?
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.
"Mark Fitzpatrick" <markfitz@.fitzme.com> wrote in message
news:eopxMJ8gIHA.2448@.TK2MSFTNGP03.phx.gbl...
> 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
> "Paul Shapiro" <paul@.hideme.broadwayData.com> wrote in message
> news:%23PwJ2hmgIHA.4396@.TK2MSFTNGP04.phx.gbl...
Wednesday, March 21, 2012
Permissions needed for user to upload file to an App_Data subfolder
Labels:
app_data,
asp,
asubfolder,
avoid,
directed,
file,
isuploaded,
net,
note,
permissions,
recompilation,
subfolder,
time,
upload,
uploads,
user
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment