Forum Moderators: open

Message Too Old, No Replies

Session Start event Firing Twice in a ASP.NET application

Session_start event firing twice.

         

Narasimha

10:21 am on Aug 20, 2009 (gmt 0)

10+ Year Member



I have an aspx which contains the 3 frames in which the source of each frame is again an aspx page. I am capturing some information on Session_start event in Global.asax file. Interestingly session_start event is firing twice. Tired of find this how?...

Any help would be greatly appreciated.

marcel

11:38 am on Aug 20, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Narasimha, Welcome to Webmasterworld [webmasterworld.com]!

AFAIK each frame maintains it's own session, but I could be wrong as I never work with frames. (and in your case it would mean firing 3x)

Here is an older thread on the subject with some ideas:
[webmasterworld.com...]

Narasimha

12:04 pm on Aug 20, 2009 (gmt 0)

10+ Year Member



Hi Marcel,
Thanks for your quick response. I have already checked the above link what you mentioned.

I checked in my application that all the pages the autoeventwire attribute is set to false only.

The strange thing here is 1st time the session_start fires from main.aspx and second time session_start event fires from the login.aspx page after i submit the userid and pwd password. That to this is happening only in the application initiation.

So, i guess having 3 frames is not the problem. pls correct me if iam wrong.

Any thoughts on this?..

Ocean10000

1:43 pm on Aug 20, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Most Browsers limit the number of connections to single server to 2. So 3 frames loading at once only 2 can hit, then the 3rd would wait till one of the original two return before being requested. And since we are using frames the two frames are requesting a new page and since the session has not been established yet, it is triggering the code twice.