Getting blank pages for error messages with UseDeveloperExceptionPage enabled

非 Y 不嫁゛ 提交于 2019-12-01 04:35:58

The order matters - put UseMvc(..) after your exception blocks so the exception middleware can catch exceptions that the Mvc middleware throws.

If you take a look at the source for DeveloperExceptionPageMiddleware you can see that it simply calls the next middleware in the pipeline inside a try/catch.

404s however will still show a blank page, as they are not an exception. To configure something else for those, take a look at StatusCodeErrorPages.

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