【问题标题】:WCF service on IIS 7, Erreur HTTP 404.3 - Not FoundIIS 7 上的 WCF 服务,错误的 HTTP 404.3 - 未找到
【发布时间】:2017-04-19 17:09:17
【问题描述】:

我知道这个问题被问了很多次,我已经阅读了所有这些问题并尝试了所有建议的答案,但对我没有任何帮助。 我正在尝试在 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"%`>

有什么建议吗?

【问题讨论】:

    标签: c# wcf iis iis-7


    【解决方案1】:

    好的,我按照以下步骤解决了这个问题:

    -执行这些命令:

    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。

    【讨论】:

      猜你喜欢
      • 2019-02-14
      • 1970-01-01
      • 2011-09-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-03
      • 1970-01-01
      • 2014-02-15
      相关资源
      最近更新 更多