To use IIS to set asp.net when an error occurs, whether it displays an error message, a custom message, or a native display of the error message and a remote display of custom information.
As shown above, if you set up in IIS, you must fill in the "Default page", which is the page you want to jump when an error occurs. I think this is a BUG, "default page" should not be required, even if it is required, it should be based on "mode" to determine some cases are required.
Also, here say "absolute URL", in fact, not necessarily "http://" beginning, directly write file name can also work.
Of course, this setting, we can also manually set in the web.config, so that "default page" can not fill out.
<system.web>
<customerrors defaultredirect= "error.htm" mode= "RemoteOnly"/>
We can remove the defaultredirect= "error.htm". This way, when an error occurs, it is not a jump surface, but instead appears as follows: