Domanda

I am trying to figure out how to programmatically detect AppDomain restart as I would need to warm up my EF and other services on successful restart. For AppPool recycle I created a windows service by using the recycle events and was wondering if there is a way to do it in the similar way. Can anyone give me any suggestions. Thanks.

È stato utile?

Soluzione

If pre-loading in global.asax is not enough (otherwise you'd not ask the question) you can use IIS Warmup module which will give you much more control on warm-up and site behavior during warm-up.

Application Initialization 1.0 for IIS 7.5 enables website administrators to configure IIS to proactively perform initialization tasks for one or more web applications. While an application is being initialized, IIS can also be configured to return an alternate response such as static content as a placeholder or "splash page" until an application has completed its initialization tasks.

Similar warm-up functionality available directly on IIS 8.0 IIS 8.0 Application Initialization.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top