Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Losing Sessions when Redirecting to a subdirectory

Reply
Thread Tools

Losing Sessions when Redirecting to a subdirectory

 
 
Dean Fields
Guest
Posts: n/a
 
      08-27-2006
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



 
Reply With Quote
 
 
 
 
Luke Zhang [MSFT]
Guest
Posts: n/a
 
      08-28-2006
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/subscripti...ult.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/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.



 
Reply With Quote
 
 
 
 
Dean Fields
Guest
Posts: n/a
 
      08-28-2006
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/subscripti...ult.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/subscripti...t/default.aspx.
> ==================================================
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
>



 
Reply With Quote
 
Dean Fields
Guest
Posts: n/a
 
      08-29-2006
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/subscripti...ult.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/subscripti...t/default.aspx.
> ==================================================
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
>



 
Reply With Quote
 
Luke Zhang [MSFT]
Guest
Posts: n/a
 
      08-29-2006
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.



 
Reply With Quote
 
Dean Fields
Guest
Posts: n/a
 
      08-29-2006
Added it back yesterday -- still working


"Luke Zhang [MSFT]" <> wrote in message
news...
> 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.
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regex losing <br> (different from the earlier topic about losing $1) Jason C Perl Misc 4 06-26-2012 10:29 PM
losing sessions when running in StateServer mode JK ASP .Net 39 08-17-2010 11:23 PM
Sporadically losing session state when redirecting from http to ht TS ASP .Net 6 01-20-2010 03:10 AM
Losing Drives - Finding Drives - Losing Drives mel@no.spam.com Computer Support 2 09-21-2007 10:16 PM
Re: Relationship between IIS Sessions and ASP.NET Sessions? Ken Cox [Microsoft MVP] ASP .Net 1 08-08-2003 03:22 PM



Advertisments