While trying to figure out why the Global.asax would not work, I decided to move onto Custom Errors and started running into problems there. I am testing the 404 (Page not found) and it keeps giving me the standard server error page rather than my own page.
I tried setting it on the IIS side of things and that did not work. In fact, having the settings match seemed to throw more errors. I have removed that change to return it to the current issue. I have provided the changes I made to make this error page. Perhaps someone brighter than me can figure out what went wrong?
<customErrors mode="On" redirectMode="ResponseRewrite" defaultRedirect="~/Error.aspx" />
Any help is widely appreciated! I did check to see if the Error.aspx exists and it does so I know it is not an actual 404 page not found issue
EDIT: Tried suggested duplicate answers and it did not work
EDIT 2: This is the error that appears on the screen
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Most likely causes:
- The directory or file specified does not exist on the Web server.
- The URL contains a typographical error.
- A custom filter or module, such as URLScan, restricts access to the file.
Things you can try:
- Create the content on the Web server.
- Review the browser URL.
- Check the failed request tracing log and see which module is calling SetStatus. For more information, click here.
Detailed Error Information:
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002