How to allow my ASPNET application to create a file?

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
 
G

Guest

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
 
S

SWu

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
 
S

Steve C. Orr [MVP, MCSD]

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
 
S

Shiv Kumar

Permission need to be set at the directory/file level using explorer. You're
using IIS Manager :)
 

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

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top