首页 > 解决方案 > IIS 如何控制 WCF 生命周期服务并将 InstanceContextmode 设置为单一?

问题描述

我开发了 InstanceContextmode 设置为单一并由 IIS 托管的 WCF 服务。IIS 可能会定期重新启动该服务。我们如何调整 IIS 在单实例模式下管理该服务的生命周期的方式?

标签: c#.netwcfinstancecontextmode

解决方案


You can try the following methods:

Click Settings in the operation box on the right side of IIS.enter image description here

Change Startmode from Ondemand to alwaysrunning. enter image description here

Then set up the hosted wcf service, enter Advanced settings and set preload enabled to true. enter image description here


推荐阅读