Back to "Alle fouten in een ASP.NET-toepassing opvangen"

This is a viewer only at the moment see the article on how this works.

To update the preview hit Ctrl-Alt-R (or ⌘-Alt-R on Mac) or Enter to refresh. The Save icon lets you save the markdown file to disk

This is a preview from the server running through my markdig pipeline

ASP.NET C# Imported mostlylucidcouk Software Development

Alle fouten in een ASP.NET-toepassing opvangen

Wednesday, 12 May 2004

Oké, Ik realiseer me dat waarschijnlijk iedereen en zijn moeder dit al weten.


protected void Application_OnError(object sender, EventArgs e)
	{
		Exception ex = Server.GetLastError();
		if ( ex is HttpException )
		{
			if (((HttpException)ex).GetHttpCode() == 404)
				return;
		}     
		ExceptionManager.Publish(ex);

	}

In dit geval is de "ExceptionManager" de ,. Microsoft Exception Manager-toepassingsblok...kan je ( en zou je dit echt moeten gebruiken in conjunctie met CustomError. De reden waarom ik het hier doe, is dat ik mijn foutpagina liever plat maakt htmlM SK4 alleen als er iets heel ergs gebeurd is en een actieve foutpagina zelf een fout zou veroorzaken. Ik dacht net:,, "I'll post up some code which emails you errors using the EMAB"

logo

© 2026 Scott Galloway — Unlicense — All content and source code on this site is free to use, copy, modify, and sell.