WCF ASP.NET 路由集成功能需要 ASP.NET 兼容性 [英] WCF ASP.NET routing integration feature requires ASP.NET compatibility
问题描述
我在尝试从我的服务器访问我的网络服务时遇到这个问题.
I am getting this issue when trying to access my web service from my server.
ASP.NET 路由集成功能需要与 ASP.NET 兼容.请参阅http://msdn.microsoft.com/en-us/library/ms731336.aspx"如何做到这一点.
ASP.NET routing integration feature requires ASP.NET compatibility. Please see 'http://msdn.microsoft.com/en-us/library/ms731336.aspx' on how to do this.
正如许多文章所建议的那样,我已将此行添加到我的 web.config 中,但我仍然遇到相同的错误.
I have added this line to my web.config just like many articles have suggested, yet I still get the same error.
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
可能是什么问题?
推荐答案
当我有一个没有配置物理路径的网站时,我遇到了同样的问题.为网站配置物理路径修复了它.
I had the same problem when I had a website with no physical path configured. Configuring a physical path for the website fixed it.
# (PowerShell)
# Give it a physical path.
mkdir C:\inetpub\wwwroot2
Set-ItemProperty "IIS:\Sites\$WebSiteName" `
-Name physicalPath -value C:\inetpub\wwwroot2
这篇关于WCF ASP.NET 路由集成功能需要 ASP.NET 兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!