Google analytics script

Latest jQuery CDN with code tiggling.

Wednesday 18 August 2010

Writing a custom IHttpModule that handles Application_OnStart event

If you've been developing Asp.net web applications you've probably come across the IHttpModule interface, that makes it possible to write reusable request-level event handlers. The same thing can of course be done by writing event handlers inside the Global.asax codebehind, but then you wouldn't be able to reuse the same code unless you do a copy/paste.

But Global.asax codebehind has one particular advantage over your custom modules: it can also attach to application-level events like application start event for instance. As per documentation, this is not possible with a custom module. Or so I thought...

Tuesday 17 August 2010

// I need my own blog
public void Blog_Start(object sender, EventArgs e){…}

Blogs have been around for a long time (at least by others), but until recently I haven't really given it a serious thought of starting my own. I simply didn't really know what to write about and I would spectacularly fail in writing my own memoires or something similar.