繁体   English   中英

IIS 7,Errur HTTP 404.3上的WCF服务-找不到

[英]WCF service on IIS 7, Erreur HTTP 404.3 - Not Found

我知道这个问题被问过很多次,我已经阅读了所有问题,并尝试了所有建议的答案,但对我来说没有任何用处。 我试图在IIS7 / Windows Server 2008上托管WCF服务,但遇到了以下错误:

HTTP Error 404.3 - Not Found

The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

我已经运行以下命令

 C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe -i

应该安装WCF并添加所有必需的MIME类型,但仍然是相同的问题。

我也通过执行以下命令确保安装了ASP.NET:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

但是仍然是同样的问题。

因此,我使用application / octet-stream类型在MIME类型上手动添加了.svc,结果是我的网站服务的内容:

`<%@ ServiceHost Language="C#" Debug="true" Service="SAGBService.SAGBService"%`>

有什么建议么?

好的,我按照下面的步骤解决了问题:

-执行以下命令:

cd\Windows\Microsoft.NET\Framework64\v4.0.30319
aspnet_regiis.exe -iru
iisreset

-打开命令提示符窗口,然后键入start inetmgr以打开Internet信息服务(IIS)MMC管理单元

-在左窗格中,展开带有计算机名称的节点,然后展开“网站”节点,然后选择“默认网站”。

-在功能视图中双击处理程序映射。

-在应用程序映射列表中,确认.svc文件已映射到aspnet_isapi.dll。 如果文件尚未映射:

    * Click Add Managed Handler.

    * Type *.svc into the Request path.

    * Type System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 into the Type textbox.

    * Type svc-Integrated-4.0 into the Name: textbox.

    * Click OK.

    * Click Add Script Map.

    * Type *.svc into the Request path.

    * Type %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll into the Executable: text box.

    * Type svc-ISAPI-2.0 into the Name: text box.

    * Click OK.

-转到模块并删除ServiceModel。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM