OpenTextFile just hangs

Discussion in 'ASP General' started by jwallison, Feb 26, 2004.

  1. jwallison

    jwallison Guest

    XPSp1/IIS 5.1

    What am I doing wrong? The following code just hangs in asp page at
    OpenTextFile() - and inet service manager just hangs if I try to unload app
    at
    this point -

    <script runat="server" language="VBScript" >
    Function JobList
    filename = "privdata/curjobs.txt"
    mappedname = Server.MapPath(filename)
    Set fso = Server.CreateObject("Scripting.FileSystemObject")
    if not fso.FileExists(mappedname) then
    JobList = "Please check again later."
    else
    Set f = fso_OpenTextFile(mappedname)
    JobList = f.ReadAll()
    Set f = Nothing
    end if
    Set fso = Nothing
    end function
    </script>

    The mappedname does point to the correct absolute path location (a virtual
    dir under "documents and settings").

    --
    Regards,

    Jim Allison

    (de-mung by removing '.1')
     
    jwallison, Feb 26, 2004
    #1
    1. Advertising

  2. jwallison

    Ray at Guest

    Most likely this.

    http://www.aspfaq.com/show.asp?id=2180

    Ray at work

    "jwallison" <> wrote in message
    news:19m%b.16909$...
    >
    > The following code just hangs in asp page at


    > Set fso = Server.CreateObject("Scripting.FileSystemObject")
     
    Ray at, Feb 26, 2004
    #2
    1. Advertising

  3. jwallison

    jwallison Guest

    That did it.

    thanks -

    "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
    message news:e3DkEHH$...
    > Most likely this.
    >
    > http://www.aspfaq.com/show.asp?id=2180
    >
    > Ray at work
    >
    > "jwallison" <> wrote in message
    > news:19m%b.16909$...
    > >
    > > The following code just hangs in asp page at

    >
    > > Set fso = Server.CreateObject("Scripting.FileSystemObject")

    >
    >
     
    jwallison, Feb 26, 2004
    #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. JT

    OpenTextFile and logging

    JT, Dec 23, 2003, in forum: ASP General
    Replies:
    4
    Views:
    191
  2. Fie Fie Niles

    FileSystemObject - OpenTextFile stucks

    Fie Fie Niles, Mar 4, 2004, in forum: ASP General
    Replies:
    3
    Views:
    166
    Fie Fie Niles
    Mar 4, 2004
  3. Simon K

    OpenTextFile and Unicode

    Simon K, Apr 5, 2004, in forum: ASP General
    Replies:
    1
    Views:
    594
    Martin Honnen
    Apr 6, 2004
  4. Serge Myrand

    OpenTextFile never return

    Serge Myrand, Jun 21, 2004, in forum: ASP General
    Replies:
    2
    Views:
    146
    Aaron [SQL Server MVP]
    Jun 21, 2004
  5. Paul
    Replies:
    6
    Views:
    298
Loading...

Share This Page