ASP App Hangs.

Discussion in 'ASP General' started by Richard Gutery, Jan 9, 2005.

  1. G'day. Slight problem that has me perplexed.

    We have an ASP app running on Win2K IIS 5.1, devloped on WinXPpro.

    Up until the other day, the app worked without problems.

    Now, the app hangs on an FSO request. I've inlcuded the relevant code below
    for referrence.

    Basically, the code will check to see if a dir exists (CALLOUT 1), then
    checks Write permissions by trying to create
    a test.txt file (CALLOUT 2), then deletes the file created in CALLOUT 3. The
    uploadsDirVar points to another disk
    volume and has the correct permissions (NTFS) assigned and have not changed
    (see CALLOUT 3 below):

    This code is thisASP file called from the site's Default.asp.

    CODE SNIPPET START:
    Dim fso, fileName, testFile, streamTest

    (CALLOUT 1)
    ' TestEnvironment is a function that simply returns a string with an error
    or is = to "" if no error.
    TestEnvironment = ""
    Set fso = Server.CreateObject("Scripting.FileSystemObject")
    if not fso.FolderExists(uploadsDirVar) then
    'Folder does not exist
    TestEnvironment = "ERROR NO: 900 (Account Error [f] )! Contact the Office
    for Assistance."
    exit function
    end if

    ' The next series try to Create and Delete a dummy file. If we cannot, then
    we have a Permissions error
    fileName = uploadsDirVar & "\test.txt"
    on error resume next

    (CALLOUT 2 - THIS IS WHERE THE APP HANGS UNTIL!)
    Set testFile = fso.CreateTextFile(fileName, true)

    (from here on out, everything works fine).
    If Err.Number<>0 then
    ' No Write Permissions
    TestEnvironment = "ERROR NO: 901 (Account Error [w] )! Contact the Office
    for Assistance"
    exit function
    end if

    (CALLOUT 3)
    Err.Clear
    ' This works, so the NTFS perms are good to go!
    testFile.Close fso.DeleteFile(fileName)
    CODE SNIPPET END:

    The dir exists and nothing has changed in terms of permissions, dir
    locations or Code. No errors are returned from the Browser, Server or App.
    It just hangs. Nothing in the Event Logs (Auditing turned on and shows no
    errors either).

    If I terminate the app (via the browser) I cannot use the app again.What I
    mean to say is that when I try to connect to the app via default.asp,
    everything just hangs.

    If we debug the app and comment out the lines at CALLOUT 2 (between the If
    and Endif) all works fine.if I create test.txt in Explorer, comment out
    CALLOUT 2 and execute the app, CALLOUT 3 will delete the file, so we know
    that IUSR_machine has the correct permissions which suggest that the server,
    app and code are all good.

    Any Ideas???

    Richard
     
    Richard Gutery, Jan 9, 2005
    #1
    1. Advertising

  2. Richard Gutery wrote:
    > G'day. Slight problem that has me perplexed.
    >
    > We have an ASP app running on Win2K IIS 5.1, devloped on WinXPpro.
    >
    > Up until the other day, the app worked without problems.
    >
    > Now, the app hangs on an FSO request. I've inlcuded the relevant code
    > below for referrence.


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

    Bob Barrows
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Jan 9, 2005
    #2
    1. Advertising

  3. Thanks for the link Bob. My bad, I should have mentioned that I disabled
    "Script Blocking in NAV". Note to self, include more information in future
    postings!

    Interestingly enough, I just hit a client web site (where I have this code
    in production) and all worked well (with and without NAV blocking scripts on
    my laptop). I suppose one of my questions would be: Why would NAV script
    blocking (client side) affect Server Side ASP? I can see this when I run the
    site on my lapatop, but on a dev server that is in my computer room.

    So as an experiement, I pulled my clients code down, put it on my dev server
    and the same thing is happening.

    Hmmm?

    btw: On my dev server, I've disabled NAV Corporate Edition altogether,
    double checked the perms (mirrored exactly as my client's server) and nada.

    R.

    "Bob Barrows [MVP]" <> wrote in message
    news:%...
    > Richard Gutery wrote:
    >> G'day. Slight problem that has me perplexed.
    >>
    >> We have an ASP app running on Win2K IIS 5.1, devloped on WinXPpro.
    >>
    >> Up until the other day, the app worked without problems.
    >>
    >> Now, the app hangs on an FSO request. I've inlcuded the relevant code
    >> below for referrence.

    >
    > http://www.aspfaq.com/show.asp?id=2180
    >
    > Bob Barrows
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
     
    Richard Gutery, Jan 9, 2005
    #3
  4. Re: ASP App Hangs. ALL FIXED!

    Problem solved! It was actually a reply from Bob Barrows that got me going
    on this - thanks Bob.

    It seems that when you disable Script Blocking in NAV (actually SYM
    Systemworks 2005) and you reboot after a Live Update, Systemworks will reset
    any options that you've turned off to the values chosen at "Install Time".
    For NAV Corporate Edition on a Server, script blocking is enabled
    automatically for all Managed Clients and when the client logs in the NAV
    client manager re-enables what ever features you've configured for "Managed
    Clients"!

    I guess the "Rule of thumb would be": Always double check NAV settings after
    Live Updates or nAV Corp Edition Updates to managed clients.

    I disables Script Blocking and all is well.

    R.

    "Richard Gutery" <> wrote in message
    news:...
    > G'day. Slight problem that has me perplexed.
    >
    > We have an ASP app running on Win2K IIS 5.1, devloped on WinXPpro.
    >
    > Up until the other day, the app worked without problems.
    >
    > Now, the app hangs on an FSO request. I've inlcuded the relevant code
    > below for referrence.
    >
    > Basically, the code will check to see if a dir exists (CALLOUT 1), then
    > checks Write permissions by trying to create
    > a test.txt file (CALLOUT 2), then deletes the file created in CALLOUT 3.
    > The uploadsDirVar points to another disk
    > volume and has the correct permissions (NTFS) assigned and have not
    > changed (see CALLOUT 3 below):
    >
    > This code is thisASP file called from the site's Default.asp.
    >
    > CODE SNIPPET START:
    > Dim fso, fileName, testFile, streamTest
    >
    > (CALLOUT 1)
    > ' TestEnvironment is a function that simply returns a string with an error
    > or is = to "" if no error.
    > TestEnvironment = ""
    > Set fso = Server.CreateObject("Scripting.FileSystemObject")
    > if not fso.FolderExists(uploadsDirVar) then
    > 'Folder does not exist
    > TestEnvironment = "ERROR NO: 900 (Account Error [f] )! Contact the
    > Office for Assistance."
    > exit function
    > end if
    >
    > ' The next series try to Create and Delete a dummy file. If we cannot,
    > then we have a Permissions error
    > fileName = uploadsDirVar & "\test.txt"
    > on error resume next
    >
    > (CALLOUT 2 - THIS IS WHERE THE APP HANGS UNTIL!)
    > Set testFile = fso.CreateTextFile(fileName, true)
    >
    > (from here on out, everything works fine).
    > If Err.Number<>0 then
    > ' No Write Permissions
    > TestEnvironment = "ERROR NO: 901 (Account Error [w] )! Contact the
    > Office for Assistance"
    > exit function
    > end if
    >
    > (CALLOUT 3)
    > Err.Clear
    > ' This works, so the NTFS perms are good to go!
    > testFile.Close fso.DeleteFile(fileName)
    > CODE SNIPPET END:
    >
    > The dir exists and nothing has changed in terms of permissions, dir
    > locations or Code. No errors are returned from the Browser, Server or App.
    > It just hangs. Nothing in the Event Logs (Auditing turned on and shows no
    > errors either).
    >
    > If I terminate the app (via the browser) I cannot use the app again.What I
    > mean to say is that when I try to connect to the app via default.asp,
    > everything just hangs.
    >
    > If we debug the app and comment out the lines at CALLOUT 2 (between the If
    > and Endif) all works fine.if I create test.txt in Explorer, comment out
    > CALLOUT 2 and execute the app, CALLOUT 3 will delete the file, so we know
    > that IUSR_machine has the correct permissions which suggest that the
    > server, app and code are all good.
    >
    > Any Ideas???
    >
    > Richard
    >
    >
    >
     
    Richard Gutery, Jan 9, 2005
    #4
  5. Re: ASP App Hangs. ALL FIXED!

    On Sun, 9 Jan 2005 12:21:34 -0700, "Richard Gutery"
    <> wrote:
    in <>

    >Problem solved! It was actually a reply from Bob Barrows that got me going
    >on this - thanks Bob.
    >
    >It seems that when you disable Script Blocking in NAV (actually SYM
    >Systemworks 2005) and you reboot after a Live Update, Systemworks will reset
    >any options that you've turned off to the values chosen at "Install Time".
    >For NAV Corporate Edition on a Server, script blocking is enabled
    >automatically for all Managed Clients and when the client logs in the NAV
    >client manager re-enables what ever features you've configured for "Managed
    >Clients"!
    >
    >I guess the "Rule of thumb would be": Always double check NAV settings after
    >Live Updates or nAV Corp Edition Updates to managed clients.


    A better rule of thumb might be to use a better Anti Virus.


    ---
    Stefan Berglund
     
    Stefan Berglund, Jan 10, 2005
    #5
  6. Re: ASP App Hangs. ALL FIXED!

    Good Point.

    "Stefan Berglund" <> wrote in message
    news:...
    > On Sun, 9 Jan 2005 12:21:34 -0700, "Richard Gutery"
    > <> wrote:
    > in <>
    >
    >>Problem solved! It was actually a reply from Bob Barrows that got me going
    >>on this - thanks Bob.
    >>
    >>It seems that when you disable Script Blocking in NAV (actually SYM
    >>Systemworks 2005) and you reboot after a Live Update, Systemworks will
    >>reset
    >>any options that you've turned off to the values chosen at "Install Time".
    >>For NAV Corporate Edition on a Server, script blocking is enabled
    >>automatically for all Managed Clients and when the client logs in the NAV
    >>client manager re-enables what ever features you've configured for
    >>"Managed
    >>Clients"!
    >>
    >>I guess the "Rule of thumb would be": Always double check NAV settings
    >>after
    >>Live Updates or nAV Corp Edition Updates to managed clients.

    >
    > A better rule of thumb might be to use a better Anti Virus.
    >
    >
    > ---
    > Stefan Berglund
     
    Richard Gutery, Jan 13, 2005
    #6
    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. Eric Seneca
    Replies:
    0
    Views:
    612
    Eric Seneca
    Jul 29, 2005
  2. Sudipto Biswas

    multi-threaded app hangs

    Sudipto Biswas, Dec 10, 2003, in forum: Python
    Replies:
    1
    Views:
    329
    Peter Hansen
    Dec 10, 2003
  3. Gitte Wange

    Timer hangs when quitting app

    Gitte Wange, Nov 28, 2004, in forum: Python
    Replies:
    1
    Views:
    276
    Peter Hansen
    Nov 28, 2004
  4. =?Utf-8?B?Sm9u?=

    App hangs when SQL table open

    =?Utf-8?B?Sm9u?=, Aug 4, 2006, in forum: ASP .Net
    Replies:
    16
    Views:
    648
    Mark Rae
    Aug 4, 2006
  5. Tim Shadel

    Gem hangs => TCPSocket.write hangs

    Tim Shadel, Jul 23, 2005, in forum: Ruby
    Replies:
    1
    Views:
    397
    Ville Mattila
    Jul 24, 2005
Loading...

Share This Page