Getting Error <location allowOverride=“false”> while hosting WEB API 2 in Hostgator

﹥>﹥吖頭↗ 提交于 2019-12-08 06:20:42

问题


I am using WEB API 2 its working in my local system,but when WEB API 2 run in Hostgator windows server its given me error below is my error screenshot

http://prntscr.com/bc5ihv


回答1:


As I commented, I got similar problem while hosting web api on shared hosting. The solution is to remove Microsoft.CodeDom.Providers.DotNetCompilerPlatform package and clean and build

You can deploy even without Roslyn with no change in code. Open NuGet Package Manager window and uninstall Microsoft.CodeDom.Providers.DotNetCompilerPlatform package and rebuild & republish. This uninstallation also removes CodeDom configuration from web.config file. This will solve your purpose. Basically this will not generate any csc.exe, vbc.exe files inside bin folder.

I got it from here



来源:https://stackoverflow.com/questions/37627074/getting-error-location-allowoverride-false-while-hosting-web-api-2-in-hostga

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