服务器重启后重新启动WCF服务 [英] Restart a WCF service after a server reboot

查看:207
本文介绍了服务器重启后重新启动WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WCF中是否有某种机制可用于预启动/预热" IIS中托管的WCF服务? -类似于SharePoint网站的热身脚本

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

我遇到这样的情况,即服务器在晚上重新启动,第二天第二天在WCF服务启动时会有很长的延迟.我无法更改使用该服务的各种应用程序的超时时间,因此第一个用户在早上使用它们的应用程序时会报告错误

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

这是在Windows 2003 Server和IIS 6.0上,因此IIS应用程序池预热模块 http: //www.iis.net/download/applicationwarmup ,因为它适用于IIS 7.5

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

注意:该模块似乎已被暂时撤回,请参阅以下详细信息 ... IIS论坛

推荐答案

我知道您不会喜欢这个答案,我想我会重复自己,因为这不是我第一次发布它.在7.5版之前的IIS中进行预热的方法是使用计划的控制台应用程序ping您的网站/服务并对其进行预热.这是一个丑陋的解决方案,但它确实有效,很容易,我在必须处理此要求的每个项目中都看到了它.

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服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆