如何使WCF网站保持在线? [英] How to keep a WCF site online?

查看:90
本文介绍了如何使WCF网站保持在线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IIS 7上有一个WCF站点.很少访问该站点,这会导致应用程序卸载.如何始终保持应用程序(WCF)正常运行?

I have an WCF site on IIS 7. The site is rarely being accessed which causes the application to unload. How can I keep the application (WCF) up all the time?

推荐答案

没有理由停止使用IIS.您需要做的就是设置应用程序池选项,以使服务永远不会由于不活动而关闭.不幸的是,默认值大约是20分钟不活动,每29小时一律不显示.

There's no reason to stop using IIS. All you need to do is set the application pool options so that the service is never shutdown due to inactivity. Unfortunately the defaults are something like 20 minutes of inactivity and every 29hrs regardless.

我建议的是:

  1. 仅为您的服务创建一个新的应用程序池.
  2. 创建后,右键单击它并选择高级设置..."
  3. 在处理器型号"组下查找空闲超时(分钟)"设置.将此设置更改为0可使服务永远不会由于空闲而关闭.
  4. 如果您不希望过程被回收,也可以考虑在回收"组下更改常规时间间隔(分钟)"设置.您可以将其设置为分钟数(如我所说的默认为29小时),也可以将其设置为0,然后配置特定时间"设置,以便在一天中的最佳时间回收服务(例如,凌晨4点左右).如果您运行Web场,则可以将其配置为以交错方式回收,以便在任何给定时间仅回收一台服务器.

有趣的琐事:之所以将默认回收时间设置为29小时,是因为这将导致每天进行回收,但是每天会延迟5小时,因此一天中的时间永远不会相同.

Fun trivia: the reason the default recycling is 29hrs is because this will cause a recycling every day, but 5hrs later each day so that the time of day is never the same.

有关配置应用程序池的更多信息,请查看TechNet上标题为

For more on configuring application pools, check out this section on TechNet titled Managing Application Pools which covers the topics I've mentioned above as well as many others.

这篇关于如何使WCF网站保持在线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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