Last post Jan 10, 2020 06:31 PM by Kumar Akshay
Dec 27, 2019 06:54 PM|Kumar Akshay|LINK
If I request for page "file with just . with missing extension" like example : https://www.mysitecom/page/car/1.
IIS 7 is showing 500 Error .I want to show 404 error instead of 500
. Similar to Google for e.g .https://www.google.com/page.
Dec 30, 2019 08:37 AM|Yongqing Yu|LINK
Are you currently using an asp.net project or a mvc project?
I suggest that you provide us with the details of the current 500 errors.
Dec 30, 2019 07:27 PM|Kumar Akshay|LINK
Currently I'm using Asp.Net project.
In the production IIS logs is see 500 errors which are mostly because of some bad requests as I suggested "https://www.mysitecom/page/car/1. "
Upon investigating I was able to trace it back to internal security tool which is randomly doing the health check by randomly ping the url's.
So I want to handle these errors are handled errors.
Dec 31, 2019 08:59 AM|Yongqing Yu|LINK
Have you tried testing in your local environment and using that url to see what error messages it will prompt?
Usually, when you lack the extension, you will get a 404 error reminder, so we guess this may be related to your IIS.
So we hope you can provide us with the details of the 500 errors so that we can help us solve your problem faster.
Jan 10, 2020 06:31 PM|Kumar Akshay|LINK
I was able to fix the isssue by updating the httpError node in web.config. Now I dont get http -500 error instead of 404.
<remove statusCode="404" />
<error statusCode="404" path="/views/home/page_not_found.aspx" responseMode="Redirect" />