WCF ASP.NET routing integration feature requires ASP.NET compatibility

我怕爱的太早我们不能终老 提交于 2019-12-21 20:03:55

问题


I am getting this issue when trying to access my web service from my server.

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.

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" />

What could be the issue?


回答1:


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


来源:https://stackoverflow.com/questions/12216791/wcf-asp-net-routing-integration-feature-requires-asp-net-compatibility

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!