Re: ASP IIS Session Hell

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: David Wang [Msft] (someone_at_online.microsoft.com)
Date: 05/25/04

  • Next message: Shane: "default web site in IIS stopped (I can start but how do I get it to start on reboot)"
    Date: Tue, 25 May 2004 01:16:16 -0700
    
    

    Sessions are maintained by cookies passed between the server and browser.
    If the server is not sending the session cookie, that is ASP configuration
    issue or bug. If the client is not returning the session cookie, that is
    client configuration/bug. It sounds like the cookies are not being passed
    back/forth (that's why "Page 2" got a totally new session ID). We need to
    check this.

    Please use WFetch or any other web-request-tool to make the request to "Page
    1" and verify that a cookie is sent by the server. Then, you need to get a
    Network trace of the interaction between the client and server to see if the
    client sends the cookie back to the server.

    One or both are not happening, and it is not clear which.

    Are you sure that you didn't ban site1 in IE somehow such that it drops its
    cookies?

    -- 
    //David
    IIS
    This posting is provided "AS IS" with no warranties, and confers no rights.
    //
    "Kenny Ashton" <ashtonCUTTHIS@ctv.es> wrote in message
    news:9565b0lpdbqqmtjr9i2fg9kuv1vfrfogur@4ax.com...
    Hi Guru's
    Problem: Lost session vars, no cookie operation
    Platform: Tosh Laptop, Win2k, IIS4 (used at home for site development)
    Structure: 3 sites off a common folder, with database folder common to
    the 3 sites
    c:\inetput\wwwroot\mysites\site1\index.htm  (127.0.0.10)
    c:\inetput\wwwroot\mysites\site2\index.htm  (127.0.0.11)
    c:\inetput\wwwroot\mysites\site3\index.htm  (127.0.0.12)
    c:\inetput\wwwroot\mysites\database\common.mdb
    I have tried evey suggestion on the entire internet, including
    reinstalling IIS, IE6, MMC etc. Can anyone tell me what to try next.
    Heres the rub - everything works perfectly on my ISP's server, all 3
    sites. Site2 and site3 work perfectly on the laptop but site1, which
    just suddenly stopped working on localhost with cookies failure.
    I have tried removing the site, recreating the physical and virtual
    folders and re-adding as a new site, with a different IP, everything
    So I erased the site, and put two pages in the site1 root, as expected
    I get -
    <% ' Page 1
    Session("sid") = Session.SessionID
    Response.Redirect "page2.asp?sid=" & Session.SessionID
    %>
    <% ' Page 2
    Response.write "Session(sid)=[" & Session("sid") & "]<br>"
    Response.write "Request(sid)=[" & Request("sid") & "]<br>"
    Response.write "Session.SessionID=[" & Session.SessionID & "]<br>"
    %>
    Page Two prints  -
    -------------------------
    Session(sid)=[] ' lost the session var contents
    Request(sid)=[345404809] ' Original Page 1 ID
    Session.SessionID=[345404810]  ' got incremented on page
    But there is nothing else in the folder, so site1 now consists of just
    these 2 pages. Tried different IP's, with/without globall.asa's
    Netscape/IE6 both same, you name it, i probably tried it.
    If anyone can suggest what the hell might be going on, or at least how
    to test next, I will deeply appreciate it.
    Kenny
    Why do people call me with their PC problems, I can't even fix my own!
    

  • Next message: Shane: "default web site in IIS stopped (I can start but how do I get it to start on reboot)"

    Relevant Pages

    • Re: tracking logins
      ... You might wonder how after the login is complete that the server can ... By TCP/IP session. ... The server sends a cookie at login time, ...
      (comp.lang.java.programmer)
    • Re: $_SESSION problem - page reload creates new Session ID
      ... > set on a page just viewed because there is a new session created ... As fas as the server is concerned all requests are independant. ... cookie back to the server. ...
      (comp.lang.php)
    • Re: Asp| Cookies vs Session Variables
      ... An in-memory cookie is stored in the client's memory. ... Session variables themselves aren't a particular burden on a server. ...
      (microsoft.public.inetserver.iis)
    • Re: Sessions vs Cookies
      ... There is a session cookie which simply allows the server to identify the client and retrieve relevant session data for it. ... If cookies can be read or forged, it makes little odds whether you have the master key or all the little keys,. ... Suppose you only send the PHPSESSID: Now you cannot change a thing on the server, even if you have the 'master key'. ...
      (comp.lang.php)
    • Re: session wont timeout
      ... Maybe this is a session cookie issue? ... client browser there is this one: WSS_KeepSessionAuthenticated Expires: At ... If I kill the session cookie using IE Developer Toolbar, ... possible and IIS would throw another challenge. ...
      (microsoft.public.sharepoint.windowsservices)