Session IssuesRSS

4 replies

Last post Apr 06, 2012 10:47 AM by yusufali

  • Session Issues

    Apr 04, 2012 11:26 AM|yusufali|LINK

    Hi,

    I have a couple of classic ASP pages with the extension of .htm.
    The main page checks for a session variable, if not found, redirects to a login page, which after authenticating successfully, saves the session var and redirects back to the main page. For some odd reason the session var is always blank in the main page.

    I have looked at all possible options and it looks like the issue is with the page. I created two simple pages in the same virtual folder, and those can set and display a session variable.

    Anybody have any ideas? I am running Windows 2000 with IIS 5.
    Thanks.

    Hasnain

  • Re: Session Issues

    Apr 05, 2012 12:33 AM|steve schofield|LINK

    instead of using .htm have you tried using .asp and see if this behavior exists?

    Steve Schofield
    Windows Server MVP - IIS
    http://iislogs.com/steveschofield
    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget

  • Re: Session Issues

    Apr 05, 2012 10:28 AM|yusufali|LINK

    Steve,

    Thanks for the suggestion. I have tried that with the same results.

    In the same application folder I have a test1.htm with <% Session("myvar")="this is test.htm" %> and a test2.htm with <% Response.Write "session myvar= " & Session("myvar") %>. When I hit test2 first, I get an empty value from the session, then hit test1 and back to test2, I get the session value. I have the exact code in my login page and the main page. Just before I redirect the login page to the main page, I write out the session value, and I do see it populated, so something is going on in the main page. I have checked through out the app, and there are no session abandons or removals. That is whats weird.

    Hasnain

  • Re: Session Issues

    Apr 05, 2012 09:56 PM|steve schofield|LINK

    How are you redirecting the user back?

    Steve Schofield
    Windows Server MVP - IIS
    http://iislogs.com/steveschofield
    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget

  • Re: Session Issues

    Apr 06, 2012 10:47 AM|yusufali|LINK

    Response.Redirect("main.htm")