How To Create A Custom 404 Error Page In Asp.net
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to return 'own' 404 custom page? up vote 9 down vote favorite 2 In case if error occurred on my web site I do the following: Server.Transfer("/error.aspx"); and that page has code: protected void Page_Load(object sender, EventArgs e) { ... Response.StatusCode = 404; } If I work on the localhost then together with 404 status returned for the page, page displays 'proper error description'. Once I published the same code to the internet all pages with errors are still displayed with 404 status code, but the don't have the content. Instead, they have the standard 404 error message: 404 - File or directory not found. if the line "Response.StatusCode = 404" commented out then the proper page is provided, but it has 200 status code. Question: how to return user-friendly error page that in the same time has 404 error status code? Any thoughts are welcome! Thanks a lot in advance! P.S. ASP.NET 4.0 asp.net http-status-code-404 share|improve this question asked Apr 12 '12 at 2:57 Budda 7,5312087156 I've always done custom 404 pages in the same way. 1) Transfer to error page 2) user friendly page copy and a 404 under the bonnet for robots. One site I'm trying to do this on now I'm having exactly the same problem - if I add "Response.Status" then a standard 404 is displayed - remove the response.status and the page copy appears but returns a 200. My uneducated guess is something changed in .NET4 framework... –Jag Apr 29 '13 at 10:50 add a comment| 5 Answers 5 active oldest votes up vote 8 down vote engine optimization. SEM/ PPCMaximize ROI on advertising spend through pay-per-click management. ContentEnrich your site with SEO content that helps visitors and feeds search engines. Social MediaTarget communities & build brand with current and future customers via social media. DesignImprove a site's relationship with search engines and users through Web design. Analytics & CROMake the most of traffic with analytics tracking and conversion optimization. Digital Marketing » Bruce Clay, Inc. Blog » Configuring a Custom 404 Error Page in Microsoft IIS Server « How to Improve... | Blog http://stackoverflow.com/questions/10116804/how-to-return-own-404-custom-page home | Your Pass to #SMX... » May 4, 2015 How to Configure a Custom 404 Error Page in Microsoft IIS Server Posted by Melanie Saxe on 05/04/2015 @ 8:57 am | Comments Off on How to Configure a Custom 404 Error Page in Microsoft IIS Server Tweet The 404 error page is a generic, browser-issued web page that tells http://www.bruceclay.com/blog/microsoft-iis-custom-404-error-page-configuration/ a visitor when a page they are looking for can’t be found. A custom 404 error page, on the other hand, is a specially-designed page that delivers the same message but in a more helpful, user-friendly way that honors the brand. It can tell the visitor what’s going on and what to do next. It can even be crafted to save a sale. This post walks through the steps of setting up a custom error 404 page if you’re a small business administering your own IIS server either directly or through a hosting provider. How to Identify Your Web Server Photo by Marc Dubois (CC by ND-2.0) There are several popular (and many more besides) software programs used to store and host web pages, called servers. If you’re not sure which server you use, contact your web host and they’ll tell you. If they say it’s Apache — and it very well might be since it’s the most widely used server on the web — leave this post and read How to Configure a Custom 404 Error Page — Apac we use for custom 404 and other error pages for ASP.NET websites running on IIS 7+. https://tedgustaf.com/blog/2011/custom-404-and-error-pages-for-asp-net-and-static-files/ 12 May 2011 0 Share it: We want custom 404 and other error pages I post this to remind myself how we got this working for both ASP.NET https://www.youtube.com/watch?v=uPYmQufC_Bk and static files, both for remote and local requests on IIS 7 and IIS 7.5. Du siehst YouTube auf Deutsch. Du kannst diese Einstellung unten ändern. Learn more You're viewing YouTube in German. You can change this preference below. Schließen Ja, ich möchte sie behalten Rückgängig machen Schließen Dieses Video ist nicht verfügbar. WiedergabelisteWarteschlangeWiedergabelisteWarteschlange Alle entfernenBeenden Wird geladen... Wiedergabeliste Warteschlange __count__/__total__ How To Make a Custom 404 Error Page HomeSchoolWebWorks AbonnierenAbonniertAbo beenden6161 Wird geladen... Wird geladen... Wird verarbeitet... Hinzufügen Möchtest du dieses Video später noch einmal ansehen? Wenn du bei YouTube angemeldet bist, kannst du dieses Video zu einer Playlist hinzufügen. Anmelden Teilen Mehr Melden Möchtest du dieses Video melden? Melde dich an, um unangemessene Inhalte zu melden. Anmelden Transkript Statistik 22.703 Aufrufe 87 Dieses Video gefällt dir? Melde dich bei YouTube an, damit dein Feedback gezählt wird. Anmelden 88 8 Dieses Video gefällt dir nicht? Melde dich bei YouTube an, damit dein Feedback gezählt wird. Anmelden 9 Wird geladen... Wird geladen... Transkript Das interaktive Transkript konnte nicht geladen werden. Wird geladen... Wird geladen... Die Bewertungsfunktion ist nach Ausleihen des Videos verfügbar. Diese Funktion ist zurzeit nicht verfügbar. Bitte versuche es später erneut. Hochgeladen am 09.05.2011I have been busy with college and other projects. Check out my latest one!http://homeschoolwebworks.net/demos/***Have a Mac? Here is a tutorial for Mac users: http://www.youtube.com/watch?v=lulWj8...Here Is a simple video on how to make a 404 Error Page. Not sure what that is click here: http://dwtuts.netau.net/mivifgdfCustom Error Pages covers up your mistakes also they are convenient so the user won't be redirected to your web host web site. Custom Error Pages allows you to express some humor and your sites personality. So be creative and have fun, but remember to not ever do it with the apology!! :p ha ha ha.Visit http://dwtut.co.ccFind us on Facebook: http://www.facebook.com/pages/Dwtuts-...And on Twitter: http://twitter.com/dwtutsHelp us get a .com domain and help the tutorials to keep on coming. Donate here on our homepage: http://dwtuts.netau.net/ Kategorie Praktische Tipps & Styling Lizenz Standard-YouTube-Lizenz Mehr anzeigen Weniger anzeigen Wird geladen... Anzeige Autoplay Wenn Autoplay aktiviert ist, wird die Wiedergabe automatisch mit einem der aktue