FileSystemObj - Permission denied (guestbook)

Results 1 to 3 of 3

Thread: FileSystemObj - Permission denied (guestbook)

  1. #1
    Join Date
    Dec 1969

    Default FileSystemObj - Permission denied (guestbook)

    I am trying to implement a guestbook using asp, and I get a permission denied error each time I run it. <BR><BR>dim fso, ts<BR>set fso = CreateObject ("Scripting.FileSystemObject")<BR>&#039 NEXT LINE CAUSES ERROR <BR>set ts = fso.CreateTextFile ("guestbook.txt", true) <BR>ts.WriteLine ("hello")<BR>ts.Close ()<BR><BR>I have tried setting write permission to the folder, but it still doesn&#039t allow the CreateTextFile to occur.<BR><BR>Any help would be appreciated.<BR>Thanks in advance.

  2. #2
    Markkk Guest

    Default 2 Recomendations

    First, identify your text file in physical terms:<BR><BR>set ts = fso.CreateTextFile ("C:InetpubwwwrootDir1guestbook.txt", true) <BR><BR>Second, make sure that the default IIS user account (usually, IUSR_MachineName) has appropriate NTFS permnissions to CREATE a file in the identified directory. Of course, if you are aurthenticating you web client, then the web client must also have NTFS persmission to CREATE a file.<BR><BR>I hope this helps.

  3. #3
    Markkk Guest

    Default 3rd recommendation

    eliminate the parenthesis in your close statement:<BR><BR>ts.Close &#039--eliminate the ()----

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts