我有一個現有的Web應用程序,它安裝在幾臺機器上。腳本客戶端和.net客戶端通過一臺機器使用「.asmx」服務,將所有調用路由到其他機器。HTTPHandler和svc
客戶端----> |網站\虛擬目錄(HttpHandler)| ----> |其他服務器\ real .asmx |
我添加了一個新的.svc服務,做相同的功能,並增加了一個處理程序,它(目錄的config):
<system.webServer>
<handlers>
<add name="MY_ASMX" verb="*" path="*.asmx" type="MY.AO.HttpProxy, Astea.AO.HttpProxy" resourceType="Unspecified" preCondition="integratedMode" />
<add name="MY_ASPX" verb="*" path="*.aspx" type="MY.AO.HttpProxy, Astea.AO.HttpProxy" resourceType="Unspecified" preCondition="integratedMode" />
<add name="MY_WSDL" verb="*" path="*.wsdl" type="MY.AO.HttpProxy, Astea.AO.HttpProxy" resourceType="Unspecified" preCondition="integratedMode" />
<add name="MY_SVC" verb="*" path="*.svc" type="MY.AO.HttpProxy, Astea.AO.HttpProxy" resourceType="Unspecified" preCondition="integratedMode" />
而ASMX請求路由罰款,我的新的.svc在終端服務器上不會被調用,甚至Httpndler也會被跳過。如果我直接在另一臺機器上調用.svc的話。
我得到的錯誤是:
WebHost failed to process a request.
Sender Information: System.ServiceModel.Activation.HostedHttpRequestAsyncResult/26458746
Exception: System.Web.HttpException (0x80004005): The service '/Mysite/MyDirectory/settings.svc' does not exist. ---> System.ServiceModel.EndpointNotFoundException: The service '/Mysite/MyDirectory/settings.svc' does not exist.
我已經嘗試過如下因素
- 添加 「buildProviders」 來統計部,去除.SVC
- 點擊MIMETYPES並輸入「的.svc 「和」application/octet-stream「並保存
- 添加處理程序:
沒有任何幫助,http處理程序不被稱爲
p.s.我使用AppPool .net 4.0集成
已經嘗試過<刪除名稱=「SVC-ISAPI-4.0_64bit」 />並沒有影響......其他擴展會被抓到,但.svc不會。 – user355289 2012-04-17 13:34:17
我也嘗試刪除所有其他處理器映射,在這個網站的IIS處理程序映射,沒有運氣 – user355289 2012-04-17 13:35:30
另外,擺脫部分這個http模塊: –
jlew
2012-04-17 20:10:08