Losing Sessions when Redirecting to a subdirectory

D

Dean Fields

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
 
L

Luke Zhang [MSFT]

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.
 
D

Dean Fields

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
 
D

Dean Fields

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?
 
L

Luke Zhang [MSFT]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top