Introduction
In this article, I will demonstrate how to hide version information of the .Net Framework, which is the "medium-level" security issue named "Information Disclosure". So I will tell you how to get rid of this issue or where you are lacking in the code. Use the following procedure to create a sample to help you understand this in detail.
Step 1. Create an Empty Website named "Version_example".
Step 2. Create a Web form named "Deafult.aspx" on the website.
I have just added some text to the page.
Step 3. Run the "Deafult.aspx" page.
Problem
A problem exists that when you change/edit the "url" the page will give an error such as page not found or resource not found as in the following image.
Solution
There are the following 2 reasons that can cause this issue:
- Either you have not added the <customErrors></customErrors> tag within <system.web>.
- Or the <customErrors></customErrors> tag within the <system.web> section with the property mode="Off".
So you need to add the <customErrors></customErrors> tag within the <system.web> section with the property mode="On" to eliminate this issue.
After adding this tag in the web.config, run the website, and change the URL.
Now as you have seen there is no information disclosure like version information that now exists on the page.