WCF ASP.NET routing integration feature requires A

2020-07-23 03:37发布

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条回答
劳资没心,怎么记你
2楼-- · 2020-07-23 03:58

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
查看更多
登录 后发表回答