Skip navigation.

Session_Start or Session_OnStart?

Comment permalink 1 Igor Olikh |
Thank you.
Comment permalink 2 Hadar |
Very nice article. it clear things up.
I was also wondering why global works like this - it is really a bad implemention.
Comment permalink 3 Jørn Schou-Rode |
"so VBScript-ish, so loosely–typed"

I think you are absolutely right! I tend to do handle all application events through HttpModules instead, which also helps to keep different functionalities apart.
Comment permalink 4 Nick |
It was probably implemented so "VBScript-ish" to support the ability to upgrade an ASP site to ASP.NET by people who are still learning ASP.NET.
Comment permalink 5 Mike |
How else would you wire these events up, through an HttpModule? That may be correct, but it may also be 'too difficult' for many VB programmers, and MS wants to help them by giving them an easy way to hook these events.

And hooking up the session events is even more difficult without global.asax
Comment permalink 6 WC |
It's a just a quick, convenient way to wire up stuff. It's obviously an aid to upgrades from classic asp. Don't like it? Write a module and delete the file. Poof, problem solved.
Comment permalink 7 Daniel Williams |
This was a great summary. Thank you for delving into it and distilling it into a short, concise article.
Comment permalink 8 Vivek |
Nice article.

Made things clear.

Thank you so much.
Comment permalink 9 PF |
Thanks for investigation! Horrible implementation :-( VisualBasic programmers are really privileged sort of people ;-)

Here [1] is the request to have the events as a part of the HttpApplication interface, but it was not listen from MS side :-(

[1] http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=104258
Comment permalink 10 Rick Wannall |
Thanks! A lovely detailed look at a detail that had made me wonder a few times also. I had emprically arrived at just about the right conclusion, but that's not really the same as knowing for sure. This was a great little find.

Submit your comment

Please enter only text since all HTML tags except hyperlinks will be stripped. Hyperlinks will become live links. Any comments with flaming or offensive language will be deleted. Be courteous to other posters. Thank you.

Your name (required):
Your email (optional):
Your site's URL (optional):
Enter this number
Type in the number above:
Comment (required):