SessionId-Problem - New in VS2005 - Each browser child window is a new session

R

Rolf Welskes

Hello,

the following sample application in ASp.net 2.0 / VS2005 (Webproject).

in an testPage.aspx

................

<P><A href="01Test01A.aspx">Link to 01Test01 A</A></P>
<P><A href="01Test01B.aspx">Link to 01Test01 B</A></P>


Now start the page.

Now DO NOT click on the link, but right click on the first link and select
'In new window'.
Now right click on the second link and select 'In new Window'.

Now you have 3 internet browser pages visible.

All three are the same application.
All three are from the same user (session).

but if you check the sessionId for the three pages all are different.
(each page shows in this sample the SessionId).

This is catastropical situation.

I think more than 30% of all internet surfers use the method to open window
of the application by using the right mouse key and
open windows in a new window.
But all session data are lost.

I hope there is any solution, because without a solution we can not use asp
for our applications,
because more than 30% of application-users would have failed data
situations.

Remark: We have made the same test with Asp 1.x /VS2003, here all works
fine.

Any help would be fine.
Thank you.
Rolf Welskes
 
S

Steven Cheng[MSFT]

Hello Rolf,

As for the mutiple sessionId when open pages from the same browser window
problem, based on my experience, it is due to the ASP.NET sessionstate
manager's lazy-loading mechanism. Actually, it is not because you open the
link/page in a new brower windows, but due to you send a new request to the
ASP.NET server. For ASP.NET web application, as long as you haven't stored
any data in the certain user's sessionState, the ASP.NET runtime will not
allocate a fixed sessionID for the current user session. You can verify
this by refresh the browser window instead of click a link (or right click
to open a page in new browser window. You will find that the ASP.NET will
always return a new sessionID each time you refresh the page(send a new
reqeust).

You can also find the description on this in the following ASPNET
sessionstate FAQ:

#ASP.NET Session State FAQ
http://www.eggheadcafe.com/articles/20021016.asp

To prevent the ASP.NET runtime from generating random sessionID, you can
add a test data into the SessionState so that the ID will be fixed for
seqential requests from the same client. e.g.

Session["data"] = "placeholder";

Hope this helps. Please feel free to let me know if there is any other
questions or anything else we can help.


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

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

Rolf Welskes

Hello,
thank you.
If i put something in the ViewState it works fine.

Thank you again.
Rolf Welskes
 
S

Steven Cheng[MSFT]

Thanks for the followup.

glad that you've also got it working. If there is anything else we can
help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top