Results 1 to 8 of 8
  1. #1
    Join Date
    May 2003
    Posts
    50

    Unhappy Unanswered: Create file - problems with

    people, why i cant create the file,


    set fs=Server.CreateObject("Scripting.FileSystemObject ")
    set f=fs.CreateTextFile("c:\test.txt",true)

    i use this lines, when i open asp file, i got error - 500
    security on c disk = everyone.

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    Kinda guessing here because there is not much information to work with but... your running these commands under the permissions of the IIS User account (normally IUSER or whatever).

    This user is unlikely to have access the the root of the hard drive....

    Try creating the file in the wwwroot or where ever the website is stored and see if that changes things.

  3. #3
    Join Date
    May 2003
    Posts
    50

    people, i still have problems with creating file

    <%
    set fs=server.createobject("scripting.filesystemobject ")

    set ofile=fs.CreateTextFile("C:\Inetpub\wwwroot\ASPtes t.txt")
    ofile.close


    set ofile=nothing
    set fs=nothing
    %>

    here is my code, why this dont want to work ?

    thanks for helping

  4. #4
    Join Date
    May 2004
    Posts
    125
    Most likely the IIS User only has read permision for that folder. Make sure the admin gives read/write permission for the folder you are trying to write to.

  5. #5
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    Are you getting any error message returned??

  6. #6
    Join Date
    May 2003
    Posts
    50

    :(

    ON FOLDERS permissions are for admin, user, = all permissions
    in IIS on folder is set read, write


    but i still get 500 error


    set fs=server.createobject("scripting.filesystemobject ")

    set tfile=fs.CreateTextFile("C:\Inetpub\wwwroot\Marek\ OBJECT - FileSystemObject\somefile.txt")
    tfile.WriteLine("Hello World!")
    tfile.close
    set tfile=nothing
    set fs=nothing

  7. #7
    Join Date
    Dec 2003
    Posts
    454
    Check the security on the folder and make sure that the permissions of Read & Execute, List Folder Contents and Read are checked for everyone on WIN 2000 or users on Win XP

  8. #8
    Join Date
    May 2003
    Posts
    50

    Problem Was In Norton Antivirus !!!

    people script is workable nad permissionas was set noormally,
    but when i disable script blocking in norton antivirus, then script works normaly, now when script blocking in norton antivirus is off, then i can create files....

Posting Permissions

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