Hey,
ASP.NET places all project files under the INetPub folder.
Is there any way that I can allow writing to the subfolder (the project folder)? I have a text file I want to write to and can't.
THanks,
Printable View
Hey,
ASP.NET places all project files under the INetPub folder.
Is there any way that I can allow writing to the subfolder (the project folder)? I have a text file I want to write to and can't.
THanks,
Yes you could, but...
You should make a subfolder from your web application, to which you grant write permissions. This denys write access to your root web directory (Inetput\mywebapp) as good security should, but allows write access to a subfolder (Inetput\mywebapp\mydata), where you can place the text file and read and write from it.
Use the VS IDE to do this. VS 2003 creates an ordinary folder for you if you right-click on your project, and choose Add Folder from within the Solution Explorer. (DO NOT assign the subfolder as a web application through your IIS Administration applet in the control panel's Administrative Tools.)
Now, go into the control panel, Adminstrative Tools, IIS Administration (or IIS Administrative Services).
Using the explorer on the left, highlight your subfolder, and right-click properties (or permissions on other windows os), choose the Directory Security Tab.
Under Anonymous Access, click browse, type ASPNET, and click find, then hit OK... (usually you get your computername\ASPNET as the account found).
Give it the proper permissions... and click OK.