|
-
Jul 10th, 2004, 04:50 AM
#1
Thread Starter
Frenzied Member
Cannot write to a file
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,
Don't anthropomorphize computers -- they hate it
-
Jul 10th, 2004, 07:33 AM
#2
I wonder how many charact
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.
Last edited by nemaroller; Jul 10th, 2004 at 07:47 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|