Where are the default Descriptions stored for the various ASP.NET HTTP errors hosted on IIS? Can they be accessed via code?
EG. The default error page for a 404 will include the following text:
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Can we read this string via code?
I can catch an HttpException (I know a HttpException != HttpError) and do things like .GetHttpCode(), but I haven't seen anywhere detailing where the IIS error messages are stored and whether I can access via code.
It would be nice if I was able to reuse the default text in a custom error page when I don't want to come up with it myself.
UPDATE 1
Following one of the comments, I investigated IIS to see where it's Error Pages are configured. Sure enough, there is an Error Pages directory, defaulting to, for example "%SystemDrive%\inetpub\custerr\\404.htm", however these error messages are different from the ones that are shown by the web application (which I assume are generated by .NET).
EG
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
These error pages are physical pages hosted on the web server, so accessing them via code is not the option I am seeking.