Avatar of hankknight
hankknightFlag for Canada

asked on 

ASP.NET: use 404.htm for custom 404 error

How can I setup a custom 404 error?  I want all page not found errors to go to 404.htm
ASP.NET

Avatar of undefined
Last Comment
Seven price
Avatar of Seven price
Seven price
Flag of United States of America image

You can either set this up with your server in IIs. That way every time your page is not found it will redirect to the 404 page you requested.
Avatar of carlosalbertoxp
carlosalbertoxp

Go to IIS...Your Virtual Directory Properties...Custom Errors Tab...Select HTTP Error 404...Edit Properties...Select Message Type=File and in the File Textbox enter the location of the htm file to be displayed Example: c:\404.htm

Hope it helps
Avatar of hankknight
hankknight
Flag of Canada image

ASKER

This is on a shared hosting service so I can't really mess with IIS.  Can this be done with web.config?
Avatar of hankknight
hankknight
Flag of Canada image

ASKER

Can web.config be modified to redirect all pages?
ASKER CERTIFIED SOLUTION
Avatar of Seven price
Seven price
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
ASP.NET
ASP.NET

The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications

128K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo