ASP.NET 5 custom error page does not render on Azure Website

后端 未结 1 611
死守一世寂寞
死守一世寂寞 2021-01-19 14:22

I have a ASP.NET 5 site that I want to add custom error pages to. I\'m used to adding entries in the web.config (from ASP.NET 4 days) but I want to use the new approach in A

相关标签:
1条回答
  • IIS is a tricky beast and we're still working through this in ASP.NET 5. When you run on IIS, we run through the middleware pipeline and then call back into IIS native modules if nothing handled the request. When you get a 404 that was un-handled by any middleware, it will re-enter the IIS pipeline and trigger IIS specific error pages. The UseStatusCodePagesWithReExecute middleware still runs, but by then, IIS has already sent the headers and body to the client (browser in this case).

    0 讨论(0)
提交回复
热议问题