views:

1198

answers:

1

Hi,

I have a problem with all multpile tab browsers due to session object. I have a requirement that whenever user opens a new browser I need to show different values, so I thought of using Session as in IE 6 every browser creates a new session. But all other multiple tab broswers IE 7 and IE 8 and FF shares the session(If user has already open the browser and try to open different broswer). Can somebody tell me how can I create new session whenver user opens a new browser window. My application is basically in ASP.NET and server side we have VB.NET.

+1  A: 

This is because you are using cookie-based sessions. Your web page instructs the browser to store a tiny file with data locally and this data is sent back to the web server whenever your browser requests a page. This cookie file is shared between all tabs in your browser instance.

Normally this is what the user expects so you should have a really good reason if you want to change it, but if need to the solution is to use the query string to store the session identifier. This is configured in your web.config file by setting the cookieless attribute of the sessionState element to the value UseUri. See here for the documentation on the sessionState element.

Rune Grimstad
Thnaks for the reply but I cannot change the web.config, is there any other way to handle this? Moreover My requirement is with multiple windows rather than multipe tabs(So if user opens multiple tabs then it'sk, only when user opens a new browser i need to show diff value)
Punit
Sorry it is not a problem with IE 7 , only with IE 8 and firefox
Punit
You cannot change the web.config? Why not? You may be able to change the setting in the Application_Start event in Global.asax, but I doubt you can change this if you cannot change the config.
Rune Grimstad
I am not supposed to change any settings in web.config thts the reason I m asking is there any other way to solve this issue
Punit