When I get an application error with an ASP.Net (3.5) site in IIS (6.0), I get dirty HTML code.
I would like to have automatically generated XHTML code , it would be nice if the web services parsed the answer ... (I'm not interested in writing custom pages).
Is it possible to specify it?
EDIT: EXAMPLE
Here, for example, is the generated page for error 404, instead I would like to clear the XHTML code, but I do not want to write it myself, can ASP.Net do this?
<html> <head> <title>La ressource est introuvable.</title> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } </style> </head> <body bgcolor="white"> <span><H1>Erreur du serveur dans l'application '/</b>/MyVirtualDirectory'.<hr width=100% size=1 color=silver></H1> <h2> <i>La ressource est introuvable.</i> </h2></span> <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> <b> Description : </b>HTTP 404. ... <br><br> <b> URL demandรฉe: </b>/MyVirtualDirectory/MyService.aspx<br><br> <hr width=100% size=1 color=silver> <b>Informations sur la version :</b> Version Microsoft .NET Framework :2.0.50727.3053; Version ASP.NET :2.0.50727.3634 </font> </body> </html>
EDIT
I assume the above HTML was created on an ASPX page, is there a place where I can find it? To get inpired and translate it to XHTML, I will use the @Remko 3rd solution to specify a custom error page.
source share