Last post May 09, 2018 08:27 AM by Nan Yu
May 08, 2018 04:03 AM|gib9898_00|LINK
I just created a new MVC application in Visual Studio 2017. In Startup.cs, I saw this:
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
I found the error page that is used in release mode (and it seems to work), but what about in developer mode? In the above code, there seems to be a call to app.UseDeveloperExceptionPage(), but where is the developer exception page? If I try to step into
the function, it doesn't take me anywhere (because it goes to an assembly file). Is the developer exception page somewhere in the solution? Is it the standard ASP.NET exception page (with the yellow background and dark red font color)? What is it? And how
can I configure it?
May 08, 2018 02:27 PM|bruce (sqlwork.com)|LINK
May 09, 2018 03:08 AM|gib9898_00|LINK
Ok, so if I wanted to customize my own developer error page, I'd do something like this, correct?
And then add DeveloperError.cshtml to Shared.
May 09, 2018 08:27 AM|Nan Yu|LINK
Please refer to below articles for how to use custom error pages in ASP.NET MVC Core