FileSystemObject Problems

Discussion in 'Classic ASP' started by ntkvms, Mar 27, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi,

    So, I'm trying to use the FSO to create files on the fly and I'm not having any luck. I read in the forum that you can only create the under your root folder (I took that to be the htdocs folder). Here is what I have been using, can someone please tell me the pathway(s) I should be using:

    First I tried the full pathway

    set tfile=fs.CreateTextFile('E:\web\asinineinfo\htdocs\' & storyheadline & '.html') - Permission denied

    Then I simply tried the htdocs folder

    set tfile=fs.CreateTextFile('\htdocs\' & storyheadline & '.html') - Path not found

    Then I tried just dumping wherever it was....

    set tfile=fs.CreateTextFile('\' & storyheadline & '.html') - Permission denied

    A little help would be great.

    Thanks.
     
  2. Use Server.MapPath, it will help you get the correct directory name without needing to know the exact path.


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  3. Hi,

    I did not change the permission on the anonymous user - I just check the quota on the Anonymous IUSR and it set at 75MB limit with 0 usage at this point.

    Other thoughts?

    Thanks,
    Van
     
  4. Are you running this ASP script with any other user by any chance? If so, you'll also need to add permissions for this user to the directory you are trying to create the files. You could also send a helpdesk ticket to support so they can check that the permissions are correct for these directories.

    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     
  5. Hi,

    Yes, I was. I figured it out right after my last post (right before the dsl went down).

    Tx!
     
  6. Hi Joel,

    I was successful in using the Server.MapPath three times... then, with no change to my code, I am getting a 'Permission denied' error once again. Any thoughts?

    I'm using:

    set tfile=fs.CreateTextFile(Server.MapPath('\archive\'))

    and i've tried:
    set tfile=fs.CreateTextFile(Server.MapPath('\'))

    But come up as permission denied.

    Thanks.
     
  7. Did you set Deny permissions for your Anonymous user with the Permission Manager? ASP scripts run under this user. Also, you might want to check that your Anonymous IUSR user has not reached it's disk quota.

    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page