It looks like this:
void Session_Start(object sender, EventArgs e) {
// your code here, it will be executed upon session start
}
It does work in Asp.net MVC.
Put it as a method in the class defined in Global.asax.cs, for example just after the RegisterRoutes method.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…