Re: IIS 6.0 Session expired with the following simple ASP lines?!?

From: Dror Gluska (drorgl-removespam-_at_yahoo.com)
Date: 08/11/04

  • Next message: anonymous_at_discussions.microsoft.com: "Re: IIS serves empty page"
    Date: Wed, 11 Aug 2004 09:49:55 +0200
    
    

    usually he'll be right, the session expires before the defined timeout if
    the application pool is recycling.

    I use this code to determine if the application is recycling: (from
    somewhere on the internet..)
    use this inside global.asa
    -------------------

        Sub Application_onStart

        'Log Application Restart
        Dim fs,tso
     Set fs = Server.CreateObject("Scripting.FileSystemObject")
     Set TSO = FS.OpenTextFile("c:\inetpub\AppStartLog.txt", 8, true)

     tso.writeline now() & " recycled"
     tso.close
     set tso = nothing
     set fs = nothing

        End Sub

    -------------------

    application restart reasons can be anywhere from bad IIS settings, special
    recycling settings inside the IIS, ASP command for recycling (don't remember
    which is it.. ), too many objects in a certain page, two sites on the same
    application pool (and one of them sucks.. :-) ), too many connections to
    database, bad code which causes the application pool to crash, access denied
    in some cases, if you're using impersonation on the IIS and not reverting
    back etc', basically too much something, try to isolate the problem by
    taking off all the pages and using what you wrote, if its still doesn't
    work, most likely two sites are on the same application pool or the IIS6
    recycling settings is too agressive, so, do your tests at your
    computer/site/server and send that Administrator specific settings you want,
    if he refuses to make those changes, change the ISP.. :-)

    oh, btw, session and cookies are not the perfect way to work, write your own
    procedures for using database for session management, this will work even
    with (almost) the worst network admin... :-)

    enjoy,
    Dror.

    "Julia" <codewizard@012.net.il> wrote in message
    news:O8R%23HnJdEHA.1000@TK2MSFTNGP12.phx.gbl...
    > Hi,
    > We are hosting our site in a shared server at our ISP web farm,
    > The session object is being expired after one minutes or so,
    > even though the administrator told us that it was set to expired after 20
    > minutes
    > in order to check our self we replace our site with two simple pages
    > the following is the code
    >
    > Test.ASP
    >
    > <%@ Language=VBScript %>
    > <%Option explicit
    > Response.Buffer=TRUE%>
    >
    > <html>
    > <head>
    > </head>
    > <%
    > if Request.Form("Submit")="Submit" then
    > Response.Write "Session=" & Session("ID") & "<BR><BR>"
    > end if
    > %>
    > <BODY>
    > <br><br><br>
    > <form name="Test" action="Test.asp" method="post" LANGUAGE="javascript" >
    > <input type="Submit" name="Submit" value="Submit" >
    > </form>
    > <P>&nbsp;</P>
    >
    > </BODY>
    > </HTML>
    >
    > and Index.asp:
    >
    >
    > <%@ Language=VBScript %>
    > <%Option explicit
    > Response.Buffer=TRUE%>
    >
    > <html>
    > <head>
    > </head>
    > <%
    > Session("ID") = "12345"
    > Response.Redirect "Test.asp"
    > Response.End
    > %>
    > <BODY>
    >
    > <P>&nbsp;</P>
    >
    > </BODY>
    > </HTML>
    >
    > Guess what,it is still not working,the administrator of the site
    > insist that there is a problem with our code!!?!?
    >
    >
    > Thanks
    >
    >


  • Next message: anonymous_at_discussions.microsoft.com: "Re: IIS serves empty page"

    Relevant Pages

    • Re: Slow Response for ASP.NET page
      ... the application pool level. ... application went down any session state was lost. ... On the Recycling tab, ... That causes the JITted assemblies to unload ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Session Timeout Problem
      ... and select the Application Pool in which your app runs. ... You don't say whether you tried using State Server. ... the loss of session variables due to Application/App Pool recycling. ... That usually works to prevent Session variable losses. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Buffer Pooling?
      ... >>If you need a buffer for each session, ... If I pool the state objects, ... > to put the state object back into the pool? ... The benefit of recycling them will be minimal. ...
      (microsoft.public.dotnet.framework.performance)
    • Re: Where are those messages before the number of received message
      ... I think the problem is with recycling application pool. ... so normally you keep the batch size low. ... the engine transfer them to BizTalk store? ...
      (microsoft.public.biztalk.general)
    • Re: OT damn pool rules
      ... mile and I have to put up a pool fence and have a building permit before ... Our recycling "rules" all say that you have to wash out all the containers before you put them in the bins. ... The trash is collected by an outside company that is paid by the city to haul it away. ...
      (alt.support.stop-smoking)

    Loading