【发布时间】: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"%`>
有什么建议吗?
【问题讨论】: