I would like to know how can I setup the IIS, or the application if needed, for the next requirement: - When the application pool starts in IIS it should call to Application_Start in Global.asax
I was playing around with applicationHost.config getting the following code:
<applicationPools>
<add name="mySite" autoStart="true" managedRuntimeVersion="v4.0" startMode="AlwaysRunning" />
<applicationPoolDefaults>
<processModel identityType="ApplicationPoolIdentity" loadUserProfile="true" setProfileEnvironment="false" />
</applicationPoolDefaults>
</applicationPools>
. .
<site name="mySite" id="2" serverAutoStart="true">
<application path="/" serviceAutoStartEnabled="true" applicationPool="mySite">
<virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot\mySite" />
</application>
<bindings>
<binding protocol="http" bindingInformation="127.0.0.1:8080:" />
</bindings>
</site>
So far the Application_Start is called only when a request is done.