Results 1 to 2 of 2

Thread: Cannot write to a file

  1. #1

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950

    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

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    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
  •  



Click Here to Expand Forum to Full Width