How to allow my ASPNET application to create a file?

  • Thread starter Thread starter SWu
  • Start date Start date
S

SWu

Hi all

Could someone tell me how to give my app permission to create a file in a
subfolder? At the moment, I am getting 'Access to the path
"C:\Inetpub\wwwroot\myWeb\uploadedfiles\temp.pdf" is denied'.

Any help anyone can give me urgently would be greatly appreciated.

Thanks,
Stephen
 
The easiest thing would be to give ASPNET user
permissions that folder. If you're ok with that from a
security point of view, then it's a good solution for you.
Thanks
 
thanks, but it's not working for me.

I went to Internet Services Manager console (I am using Win XP Pro), opened
properties for that particular folder, added "Write" permission on the
Directory tab, tried that but didn't work.

Then went to Directory Security (even though I didn't think this was where I
needed to be), saw that it allowed Anonymous Access and changed the user
that it uses to ASPNET but that didn't work either.

Do you (or anyone) have any other suggestions, please?

thanks
 
Well I'm not sure why that didn't work. It should have worked assuming it's
a local drive.
You might want to try using impersonation so you're running under a user
account that has the necessary permissions. (Try setting it to your
username & pw for initial testing purposes.)
Here's more info:
http://msdn.microsoft.com/library/d...-us/cpguide/html/cpconaspnetimpersonation.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com
 
Permission need to be set at the directory/file level using explorer. You're
using IIS Manager :)
 
Back
Top