Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Help on 404 custom

$
0
0

"Create a web page (Err404.aspx) with custom error message which will be displayed when a user try to access a non-existing web page"

I created the ERR404.aspx page, now this is code when i add to be web.config file

<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<compilation debug="true" />

<!-- Turn on Custom Errors -->
<customErrors mode="On"
defaultRedirect="/nonexistingpage.aspx">
<error statusCode="404" redirect="/Err404.aspx"/>
</customErrors>

</system.web>
</configuration>

Now my end state is to basically test the configuration when the non existing webpage by typing https://localhost/nonexistingpage.aspx

I would appreciate any help on this issues please.

Rickyjj


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>