script problem

Discussion in 'ASP General' started by Freeserve, Oct 3, 2003.

  1. Freeserve

    Freeserve Guest

    I am trying to write to a file using:

    <%

    Sub OpenTextFileTest

    Const ForReading = 1, ForWriting = 2, ForAppending = 8

    Dim fso, f

    Set fso = CreateObject("Scripting.FileSystemObject")

    Set f = fso_OpenTextFile("c:\inetpub\rako\commands.txt", ForAppending, True)

    f.Write "Hello world!"

    f.Close

    End Sub

    %>



    When i call this the script hangs. If I try page refresh, I get "The
    requested resource is in use". I have to kill the dllhost.exe process to
    free things up.

    Any ideas why this won't work?
     
    Freeserve, Oct 3, 2003
    #1
    1. Advertising

  2. Sounds like classic script blocking problem, I am guessing you have norton
    antivirus on your machine? Go into NAV and locate script
    blocking.....disable it and then things should start working.

    Something to do with script block and the FSO.

    Good luck

    Stu

    "Freeserve" <> wrote in message
    news:blji7u$qou$...
    > I am trying to write to a file using:
    >
    > <%
    >
    > Sub OpenTextFileTest
    >
    > Const ForReading = 1, ForWriting = 2, ForAppending = 8
    >
    > Dim fso, f
    >
    > Set fso = CreateObject("Scripting.FileSystemObject")
    >
    > Set f = fso_OpenTextFile("c:\inetpub\rako\commands.txt", ForAppending,

    True)
    >
    > f.Write "Hello world!"
    >
    > f.Close
    >
    > End Sub
    >
    > %>
    >
    >
    >
    > When i call this the script hangs. If I try page refresh, I get "The
    > requested resource is in use". I have to kill the dllhost.exe process to
    > free things up.
    >
    > Any ideas why this won't work?
    >
    >
     
    Stuart Palmer, Oct 3, 2003
    #2
    1. Advertising

  3. Freeserve

    Freeserve Guest

    Yes. That fixed it. Thanks.

    "Stuart Palmer" <> wrote in message
    news:bljl6f$1e6k$...
    > Sounds like classic script blocking problem, I am guessing you have norton
    > antivirus on your machine? Go into NAV and locate script
    > blocking.....disable it and then things should start working.
    >
    > Something to do with script block and the FSO.
    >
    > Good luck
    >
    > Stu
    >
    > "Freeserve" <> wrote in message
    > news:blji7u$qou$...
    > > I am trying to write to a file using:
    > >
    > > <%
    > >
    > > Sub OpenTextFileTest
    > >
    > > Const ForReading = 1, ForWriting = 2, ForAppending = 8
    > >
    > > Dim fso, f
    > >
    > > Set fso = CreateObject("Scripting.FileSystemObject")
    > >
    > > Set f = fso_OpenTextFile("c:\inetpub\rako\commands.txt", ForAppending,

    > True)
    > >
    > > f.Write "Hello world!"
    > >
    > > f.Close
    > >
    > > End Sub
    > >
    > > %>
    > >
    > >
    > >
    > > When i call this the script hangs. If I try page refresh, I get "The
    > > requested resource is in use". I have to kill the dllhost.exe process

    to
    > > free things up.
    > >
    > > Any ideas why this won't work?
    > >
    > >

    >
    >
     
    Freeserve, Oct 3, 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. Cédric Rossé
    Replies:
    1
    Views:
    533
    Cédric Rossé
    Nov 9, 2004
  2. Edward
    Replies:
    1
    Views:
    5,816
    ge0rge
    Apr 3, 2006
  3. Rajat
    Replies:
    3
    Views:
    705
    Jorgen Grahn
    Jan 8, 2010
  4. VYAS ASHISH M-NTB837
    Replies:
    2
    Views:
    565
    Jan Kaliszewski
    Jan 7, 2010
  5. Veera Sundaravel

    Problem with script.aculos.us script

    Veera Sundaravel, May 12, 2007, in forum: Ruby
    Replies:
    1
    Views:
    106
    Rob Biedenharn
    May 12, 2007
Loading...

Share This Page