Hi,
We have an ASP.net application that stores items in session.
We found the following:
If another tab is opened in IE and directed to the app then this tab also shares the same session as the 1st tab
If another window is opened by ctrl n this also shares the same session as the original window
If an new instance of IE is opened this does NOT share the same session
We would like a way of identifying individual instances however the window is open.
As the session seems to be shared if opened as a tab or ctrl N how would you suggest this is done? I would imagine that since session is shared so will cookies be?
Thanks,
Alex
-
-
Cookies are bound to a domain (channel9.msdn.com), so they are shared across sessions.
Also if you right-click open link in new browser, the session gets shared. Highly annoying
I don't know a way to detect if you use multiple browsers for one session. But I am interested in your findings
Edit After some researching:
- Request.Cookies[0] {System.Web.HttpCookie} System.Web.HttpCookie
Domain null string
+ Expires {1/1/0001 12:00:00 AM} System.DateTime
HasKeys false bool
HttpOnly false bool
Name "ASP.NET_SessionId" string
Path "/" string
Secure false bool
Value "mplb0m55gnlrtt45rg4xdl55" string
+ Values {mplb0m55gnlrtt45rg4xdl55} System.Collections.Specialized.NameValueCollection {System.Web.HttpValueCollection}
+ Non-Public members
Each request holds a cookie with a session id. That cookie get copied if you open in new tab, or open in new window. That's how your session get's shared.
If you make a new window, the initial request does not hold this cookie. And it's not persistant (check the expiration date), so you open a new session. -
Hmm I will have to have a look into this some more!Maddus Mattus said:Cookies are bound to a domain (channel9.msdn.com), so they are shared across sessions.
Also if you right-click open link in new browser, the session gets shared. Highly annoying
I don't know a way to detect if you use multiple browsers for one session. But I am interested in your findings
Edit After some researching:
- Request.Cookies[0] {System.Web.HttpCookie} System.Web.HttpCookie
Domain null string
+ Expires {1/1/0001 12:00:00 AM} System.DateTime
HasKeys false bool
HttpOnly false bool
Name "ASP.NET_SessionId" string
Path "/" string
Secure false bool
Value "mplb0m55gnlrtt45rg4xdl55" string
+ Values {mplb0m55gnlrtt45rg4xdl55} System.Collections.Specialized.NameValueCollection {System.Web.HttpValueCollection}
+ Non-Public members
Each request holds a cookie with a session id. That cookie get copied if you open in new tab, or open in new window. That's how your session get's shared.
If you make a new window, the initial request does not hold this cookie. And it's not persistant (check the expiration date), so you open a new session. -
alexmac said:
Hmm I will have to have a look into this some more!Maddus Mattus said:*snip*did anyone find a solution? I think I am going to have to append a guid to viewstate and now store my object using a key/value collection in session with the guid, I am just not happy about this solution, for any site that deals with newsletters and lots of users returning in a short space of time is looking at tinkering on the edge of memory death (freaken 2003 x86!) . How do we send a request to the asp.net team for a out the box solution in 2010!!!!!
-
dvr123 said:alexmac said:*snip*
did anyone find a solution? I think I am going to have to append a guid to viewstate and now store my object using a key/value collection in session with the guid, I am just not happy about this solution, for any site that deals with newsletters and lots of users returning in a short space of time is looking at tinkering on the edge of memory death (freaken 2003 x86!) . How do we send a request to the asp.net team for a out the box solution in 2010!!!!!
You need multiple tab stuff too? Doesn't sound like you are in your post, you just need cookies to remember things.
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.