2016-08-01 56 views
0

是否有其他方法可以在IIS集成应用程序池中运行我的WCF 3.5 Rest API?有没有办法在集成应用程序池中运行wcf3.5 rest api

下面是在事件查看器的消息:

映射到ASPNET_ISAPI.DLL的请求是在集成.NET模式运行的应用程序 池之内。在Classic .NET模式下运行时,Aspnet_isapi.dll只能使用 。请在处理程序映射上指定 preCondition =“ISAPImode”,以使其仅在 以Classic .NET模式运行的应用程序池中运行,或将 应用程序移动到另一个以Classic .NET模式运行的应用程序池 以便使用此处理器映射。

而这里的system.webServer > handlers下我的web.config的处理程序入口:

<add name="svc-ISAPI-2.0_64" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="" /> 

回答

1

你可以尝试变化处理程序登记的其中之一:

<add name="svc-Integrated" path="*.svc" verb="*" 
type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
preCondition="integratedMode,runtimeVersionv2.0" /> 

<add name="svc-Integrated-4.0" path="*.svc" verb="*" 
type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
preCondition="integratedMode,runtimeVersionv4.0" /> 

其中ONO使用取决于在Application Pool上设置的.Net Framework版本。根据您现有的处理程序注册,第一个应该是正确的。

+0

非常感谢!你能解释一下我的情况发生了什么,以及如何解决它?如果不是,不用担心,我明白。再一次,谢谢你! – Rod

相关问题