问题
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