我正在尝试将WCF WebHTTP服务部署到IIS上。我正在运行Windows 7,IIS 7.5,VS2010。

这些步骤 - 创建了一个项目WCF REST服务应用程序。 - 将该项目发布给Localhost-确保ApplicationPool为.NET 4.0

但是,当尝试访问在(默认网站/hellorest)上发布的服务时 http:// localhost/hellorest

它给出了一个错误 -

错误摘要 HTTP错误500.19-内部服务器错误此配置部分不能在此路径上使用。当该部分锁定在父级时,就会发生这种情况。默认情况下锁定是锁定(OverRideModedEdefault =“ deny”),或者通过具有OverRideMode =“ deny”的位置标签明确设置,或者是legacy alliCacy alliCacy允许RIDE =“ false”。

在配置源中 模块RunallManagedModulesForallRequests =“ True”突出显示

我有什么缺少的吗?当我从VS执行时,服务正常。在globals.asax我有 -

RouteTable.Routes.Add(new ServiceRoute("PrintHelloWorld", new WebServiceHostFactory(), typeof(HelloRestService)));

从VS2010执行时http:// localhost:59404/printhellowerld/ 返回Hello World。但是,一旦出版

http:// localhost/hellorest/printhellowerld 也返回相同的错误。

编辑弄清楚了解决方案。 - 安装.NET框架后我已经安装了IIS。在Commandline中执行ASP.NET注册工具 - 转到Windows Microsoft.net Framework v4.0.30319 type aspnet_regiis.exe -ir中的目录

现在它开始工作。

没有正确的解决方案

其他提示

我不是.NET的专家...但是您是否尝试过这些建议?http://forums.asp.net/t/1220987.aspx

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top