How can I allow my website visitors to create text files in ASP.NET?

I have Microsoft IIS and I have written a simple ASP.NET application that should allow a user to create a file on my server. I have allowed the Internet User permission to write to my wwwroot folder, but the application still won’t work, it throws an exception saying that access to the path is denied. What else can I do to allow my visitors to create files? Thanks.

Powered by Yahoo! Answers

One thought on “How can I allow my website visitors to create text files in ASP.NET?”

  1. Any time you see the access to path denied error, that’s usually because you have not properly granted permission to the folder for the process that is actually running ASP.NET. This is often the NETWORK SERVICE account, NOT the ASPNET worker account (WS 2003 and later).

    It is also possible that you are either not changing the name of the file being written, or you are not closing it and destroying the file object before someone else creates it. Only one user at a time can have a file open.

Leave a Reply

Your email address will not be published. Required fields are marked *