开发者

Restart a WCF service after a server reboot

开发者 https://www.devze.com 2023-01-18 15:34 出处:网络
Is there some mechanism in WCF that can be used to \"pre-start / warm-up\" WCF services that are hosted in IIS ?

Is there some mechanism in WCF that can be used to "pre-start / warm-up" WCF services that are hosted in IIS ? - something like the warm-up scripts for SharePoint sites

I have the situation where servers are re-booted over night and next day there is a long delay while the WCF services spin-up. I can't change the time-out in various applications that use the services, so the first users are reporting errors in the morning when they go to use their applications

This is on Windows 2003 Server and开发者_开发问答 IIS 6.0, so the IIS Application Pool Warm-Up Module, http://www.iis.net/download/applicationwarmup, as that's for IIS 7.5

NOTE: the module seems to have been temporarily withdrawn, see details on ... IIS Forum


I know you will don't like the answer and I think I repeat myself because it is not the first time I'm posting it. The way to warm-up anything in IIS prior to version 7.5 is using scheduled console application to ping your web site / services and warm them up. It is ugly solution but it works, it is easy and I saw it on every project which had to deal with this requirement.


WCF services should be instantly ready when they start. Just make sure the services are set to automatically start when the server boots.


You can use Windows Server AppFabric, it has Auto Stat feature to keep the service always on. But you need to be on IIS 7.5 to install App Fabric.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号