Can't save file...

Discussion in 'ASP General' started by Philipp Lenssen, Nov 21, 2003.

  1. On my server (IIS5 on localhost on WinXP, latest Win-patches etc.) I
    can't seem to save a simple file. All rights are set and IIS-user is
    administrator. My server crashes. Have to restart the server/ wait some
    minutes. There's no error message, just a continuous loading bar in my
    IExplorer...
    That's my function below, and I'm really sure I used it on other
    systems before and it worked.

    public sub setFileText(byVal relativePath, byVal fileText)
    const overwrite = true
    dim fileSystem
    dim fileHandle
    dim absolutePath

    absolutePath = server.mapPath(relativePath)

    set fileSystem = server.Createobject("Scripting.FileSystemObject")
    set fileHandle = fileSystem.createTextFile(absolutePath,
    _overwrite, 0)
    fileHandle.write fileText
    fileHandle.close

    set fileHandle = nothing
    set fileSystem = nothing
    end sub

    (... some error handling removed for clarity ... it still doesn't
    work... and no error message either.)

    BTW I can use XML object's file-saving methods so it can't really be a
    permission-issue...
    Anyone got any ideas?
    Philipp Lenssen, Nov 21, 2003
    #1
    1. Advertising

  2. Philipp Lenssen

    Ray at Guest

    "Philipp Lenssen" <> wrote in message
    news:bplcqq$1om5sf$-berlin.de...
    > There's no error message, just a continuous loading bar in my
    > IExplorer...


    > set fileSystem = server.Createobject("Scripting.FileSystemObject")


    http://www.aspfaq.com/2180

    Ray at work
    Ray at, Nov 21, 2003
    #2
    1. Advertising

  3. Ray a wrote:

    >
    > "Philipp Lenssen" <> wrote in message
    > news:bplcqq$1om5sf$-berlin.de...
    > > There's no error message, just a continuous loading bar in my
    > > IExplorer...

    >
    > > set fileSystem =
    > > server.Createobject("Scripting.FileSystemObject")

    >
    > http://www.aspfaq.com/2180
    >


    Wow. I can't believe it. That was exactly the cause. Thanks so much!
    Philipp Lenssen, Nov 21, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. user
    Replies:
    1
    Views:
    760
    Bruce Barker
    Apr 4, 2005
  2. teo
    Replies:
    1
    Views:
    459
  3. BusyBoy
    Replies:
    2
    Views:
    599
    =?Utf-8?B?TGVvbiBNYXluZQ==?=
    Oct 31, 2006
  4. hycn office
    Replies:
    2
    Views:
    179
    WIlliam Morris
    Oct 10, 2003
  5. Shahar Golan
    Replies:
    5
    Views:
    288
    kaeli
    Oct 16, 2003
Loading...

Share This Page