What starts with Application_Start or WebRole OnStart?

I have an MVC project on Windows Azure. This project has a WebRole with the OnStart method. And I want to know what starts with Application_Start from Global.asax or WebRole OnStart?

+5
asp.net-mvc azure azure-web-roles
source share
3 answers

I’m pretty sure that after SDK 1.3 it’s not childish. An attempt to time from something from one to another will simply end in a racing state.

Prior to 1.3, the Hosted Worker Core (HWC) core was hosted in RoleEntryPoint, so a deterministic launch was installed (OnStart, Application_OnStart, IIRC). However, now that IIS hosts the website, IISConfigurator.exe creates the application pool, etc., and ultimately w3wp.exe hosts your website. This is a different process than your RoleEntryPoint, so you can start over.

+5
source share

I can’t find 100% full links to this (about the best I've seen, http://blog.syntaxc4.net/?p=271 ), but I believe the sequence:

  • Any startup tasks in progress
  • The WebRole OnStart method is called
  • The WebRole Run () method is called - and at the same time, IIS launches websites, so at this point Application_Start will be called for the first time.
+3
source share
0
source share

All Articles