OData returns internal server error (500) when calling a controller that not exists - on iis

霸气de小男生 提交于 2021-01-05 06:41:14

问题


when calling for example http://localhost/odata/test - (no TestController implemented),

Odata return internal server error instead of 404 (Not Found).

What can I do?


回答1:


Confirm the path="*." in the web.config file (inside <system.webServer> <handlers>)

    <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0"/>


来源:https://stackoverflow.com/questions/46884389/odata-returns-internal-server-error-500-when-calling-a-controller-that-not-exi

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