【发布时间】:2010-09-23 15:38:33
【问题描述】:
我正在使用 VS2010 + C# + .Net 4.0 + IIS 7.5 + Windows 7。当我在 IIS 中为 WCF 项目打开一个 svc 文件(在 IIS 管理器中,右键单击 svc 文件并选择浏览)时,有一个像这样的错误,有什么想法吗?
This type of page is not served.
Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.svc' may be incorrect. Please review the URL below and make sure that it is spelled correctly.
这是我使用的web.config文件的内容,对吗?
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<remove fileExtension=".svc" />
</staticContent>
<handlers>
<remove name="svc-ISAPI-2.0" />
<remove name="svc-Integrated" />
<add name="svc-ISAPI-2.0" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
</handlers>
</system.webServer>
</configuration>
【问题讨论】:
标签: c# .net wcf visual-studio-2010 iis-7