ASP.NET and Sessions - New Browser Instance and New Browser Window

I hope someone can clarify this behavior for me and explain how ASP.NET decides when to consider something like a new session.

A) In Internet Explorer I load the ASP.NET site. He begins a new session.
B) If I go to the File menu - New window ... it will remain within the same session.
C) If I start a new instance of Internet Explorer and load the same page, it starts a new session.

I got confused in step C. I expect this to be the same session based on my remote IP address.
What does IIS / ASP.NET do to decide that this is a new session? Is it a look at my remote port that uses a new instance of IE? When you open a new window using File - New, it uses the same remote port as the parent.

+6
iis session session-state
source share
4 answers

Sessions in IIS / ASP.NET are based on cookies with a session area, which means that they are destroyed when the browser is closed and, apparently, they are not used in different Internet Explorer processes.

When you open a new browser window using File> New Window, the window will be processed by the same process as the first (i.e. the same iexplorer.exe). When you start IE from the Start menu, you will get a new process, and now you will have two iexplorer.exe in the task manager. I think that only IE 7 will spawn multiple processes.

As a side note, IE 8 will have one process per tab / window, such as Google Chrome. I don’t know if these browsers use session cookies among processes, but this is definitely something to keep in mind when testing using one of these browsers.

+13
source share

By default, ASP.NET monitors sessions using cookies. The new IE instance does not have a session cookie, resulting in a new session. However, using File → New Window from an existing IE window, you will create a new window with the same cookies as the “parent”, which will allow ASP.NET to use the existing session.

+4
source share

I am wondering if the new IE instance will have the same cookies as in case B, where when this new window, it uses the same process. Typically, a cookie or querystring uses the value used to map sessions to different clients.

0
source share

It would seem that session data is cached for each process. A) and B) exist in the same process, while starting a new instance of IE will create a new process.

0
source share

All Articles