views:

353

answers:

1

Hi,

I'd like to stop IE8 from sharing my sessions in one of two ways (or both if possible):

  1. Through configuring the browser to always do this (so I can force my users to configure their browsers in this way).

  2. Through code in my web application.

Thanks.

A: 

Instead of storing data in the session directly, create a custom tab-level session upon demand and store everything there. When a new request for any page comes in, create a Dictionary<string, object> to use as the tab-level session and then store it in the session based on a unique key. Pass this unique key from page to page either in the viewstate or url.

However, you need to prevent users from opening links in a new tab (which will make them mad, so this really isn't a good thing to do anyways). To do that make sure all links are postbacks only.

Sam
Sounds like a lot of work - what is the point of my ASP.NET session state if I can't use it??
husainnz
@husainnz, if you don't want to use sessions the way they're meant to be used then you need to do some work on your own.
Sam