Losing Sessions when Redirecting to a subdirectory

Discussion in 'ASP General' started by Dean Fields, Aug 27, 2006.

  1. Dean Fields

    Dean Fields Guest

    Hello,

    I am having some session problems wih an in-house (classic) asp application.
    My developers have not been able to figure it out. I am more of a systems
    admin type and much of this is over my head. But I will try to explain the
    best I can and tell you what I know so far.

    First a little summary of environment. I am running iis6 in a web farm with
    hardware NLB and 5 servers. Each server is identical. Each server uses a
    hosts file so when there is a reference to an internal url it refers back to
    itself instead of going to LB. Session timeouts are set for 20min, Parent
    Paths are enabled. No special ntfs stuff going on. Using anon iis user

    The application is in a subdirectory of the default web site, the "sending"
    asp page is in the root of this subdirectory and has a redirect to the
    "receiving" asp page in a subdirectory of the apps starting directory. The
    application and session variables work on 4 of the 5 servers

    Now here are some things I have done and observed

    Checked all settings, iis, permissions, app pools, turned off recycling,
    etc. I copied all relevant files (the app is not that simple, lots of
    includes, sql queries, etc) from server to server and still no luck. .

    I could not find rhyme or reason for what is going on so I created a simple
    app where one asp page passes a couple session variables to another residing
    in same directories as problem apps. Again, we have failure on the problem
    server and success on other servers. (But I do have success when both pages
    are in same directory)

    The only info I have found that looks like this is "application scope."
    However all discussions I have read refer to global.asa. I am not using
    global.asa.

    Where else can I look? What else can I do?

    Thanks,
    Dean
     
    Dean Fields, Aug 27, 2006
    #1
    1. Advertising

  2. Hello Dean,

    Since the problem also occur with your simple test asp application, it
    should do nothing with your original ASP application, may be a configration
    issue on the special server.

    I suggest you may continue to test with the simple test asp application and
    add a global.asa to its root folder with following code:

    Sub Session_OnStart

    Session("Test")="Hello"

    End Sub

    In the asp page locating sub folder, use following code to access the
    session

    <%

    Response.Write Session("Test")

    %>

    Will it give correct value?

    (The sub folder should be a "pure" folder, not a virtual folder defined in
    IIS Manager)

    Sincerely,

    Luke Zhang

    Microsoft Online Community Support
    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.

    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/subscriptions/support/default.aspx.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Luke Zhang [MSFT], Aug 28, 2006
    #2
    1. Advertising

  3. Dean Fields

    Dean Fields Guest

    Hi Luke,

    I tried what you suggested. I get a blank page. But lets make sure I am
    doing this correctly. I will give you the virtual paths I am using:

    domain.com/ARS contains the sending asp page

    domain.com/ARS/NewExtranet contains the receiving asp page

    Variable not being passed with that (When both are in ARS or NewExtranet it
    works)

    I put your global.asa in ARS and the asp page in NewExtranet - got a blank
    page browsing the asp page (also when both files are in NewExtranet)

    Is that what you wanted to see?

    More Notes: Both folders are "real" and directory structure in web is same
    as physical folder structure (no little globe icons). ARS is a folder that
    had been converted to an application. All subfolders are normal.

    anything else?

    thanks,
    Dean







    "Luke Zhang [MSFT]" <> wrote in message
    news:...
    > Hello Dean,
    >
    > Since the problem also occur with your simple test asp application, it
    > should do nothing with your original ASP application, may be a
    > configration
    > issue on the special server.
    >
    > I suggest you may continue to test with the simple test asp application
    > and
    > add a global.asa to its root folder with following code:
    >
    > Sub Session_OnStart
    >
    > Session("Test")="Hello"
    >
    > End Sub
    >
    > In the asp page locating sub folder, use following code to access the
    > session
    >
    > <%
    >
    > Response.Write Session("Test")
    >
    > %>
    >
    > Will it give correct value?
    >
    > (The sub folder should be a "pure" folder, not a virtual folder defined in
    > IIS Manager)
    >
    > Sincerely,
    >
    > Luke Zhang
    >
    > Microsoft Online Community Support
    > ==================================================
    > Get notification to my posts through email? Please refer to
    > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    > ications.
    >
    > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    > where an initial response from the community or a Microsoft Support
    > Engineer within 1 business day is acceptable. Please note that each follow
    > up response may take approximately 2 business days as the support
    > professional working with you may need further investigation to reach the
    > most efficient resolution. The offering is not appropriate for situations
    > that require urgent, real-time or phone-based interactions or complex
    > project analysis and dump analysis issues. Issues of this nature are best
    > handled working with a dedicated Microsoft Support Engineer by contacting
    > Microsoft Customer Support Services (CSS) at
    > http://msdn.microsoft.com/subscriptions/support/default.aspx.
    > ==================================================
    >
    > This posting is provided "AS IS" with no warranties, and confers no
    > rights.
    >
    >
    >
     
    Dean Fields, Aug 28, 2006
    #3
  4. Dean Fields

    Dean Fields Guest

    I got the app to work, but don't ask me how cuz I don't know. Just started
    working while playing with your files.

    I did change the IP to remove it from NLB network. do you think the tcp/ip
    stack could interfere with sessions?


    "Luke Zhang [MSFT]" <> wrote in message
    news:...
    > Hello Dean,
    >
    > Since the problem also occur with your simple test asp application, it
    > should do nothing with your original ASP application, may be a
    > configration
    > issue on the special server.
    >
    > I suggest you may continue to test with the simple test asp application
    > and
    > add a global.asa to its root folder with following code:
    >
    > Sub Session_OnStart
    >
    > Session("Test")="Hello"
    >
    > End Sub
    >
    > In the asp page locating sub folder, use following code to access the
    > session
    >
    > <%
    >
    > Response.Write Session("Test")
    >
    > %>
    >
    > Will it give correct value?
    >
    > (The sub folder should be a "pure" folder, not a virtual folder defined in
    > IIS Manager)
    >
    > Sincerely,
    >
    > Luke Zhang
    >
    > Microsoft Online Community Support
    > ==================================================
    > Get notification to my posts through email? Please refer to
    > http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    > ications.
    >
    > Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    > where an initial response from the community or a Microsoft Support
    > Engineer within 1 business day is acceptable. Please note that each follow
    > up response may take approximately 2 business days as the support
    > professional working with you may need further investigation to reach the
    > most efficient resolution. The offering is not appropriate for situations
    > that require urgent, real-time or phone-based interactions or complex
    > project analysis and dump analysis issues. Issues of this nature are best
    > handled working with a dedicated Microsoft Support Engineer by contacting
    > Microsoft Customer Support Services (CSS) at
    > http://msdn.microsoft.com/subscriptions/support/default.aspx.
    > ==================================================
    >
    > This posting is provided "AS IS" with no warranties, and confers no
    > rights.
    >
    >
    >
     
    Dean Fields, Aug 29, 2006
    #4
  5. Hello Dean,

    Thank you for the update. changing the IP may cause series of changes in
    current system. I am not sure if these fixed the problem. (tcp/ip stack
    wouldn't interfere with sessions, but a IIS restart or change in code will
    do that). Have you tried to add the server to NLB again?


    Sincerely,

    Luke Zhang

    Microsoft Online Community Support
    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Luke Zhang [MSFT], Aug 29, 2006
    #5
  6. Dean Fields

    Dean Fields Guest

    Added it back yesterday -- still working


    "Luke Zhang [MSFT]" <> wrote in message
    news:p...
    > Hello Dean,
    >
    > Thank you for the update. changing the IP may cause series of changes in
    > current system. I am not sure if these fixed the problem. (tcp/ip stack
    > wouldn't interfere with sessions, but a IIS restart or change in code will
    > do that). Have you tried to add the server to NLB again?
    >
    >
    > Sincerely,
    >
    > Luke Zhang
    >
    > Microsoft Online Community Support
    > This posting is provided "AS IS" with no warranties, and confers no
    > rights.
    >
    >
    >
     
    Dean Fields, Aug 29, 2006
    #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. Ken Cox [Microsoft MVP]

    Re: Relationship between IIS Sessions and ASP.NET Sessions?

    Ken Cox [Microsoft MVP], Aug 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    5,372
    Luther Miller
    Aug 8, 2003
  2. TS
    Replies:
    6
    Views:
    1,030
    James
    Jan 20, 2010
  3. JK
    Replies:
    39
    Views:
    1,655
  4. scottymo
    Replies:
    3
    Views:
    706
    Dominick Baier
    Sep 30, 2006
  5. Jason C
    Replies:
    4
    Views:
    687
    Morty Abzug
    Jun 26, 2012
Loading...

Share This Page