2016-08-01 57 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

相關問題