X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Web%2FSystem.Web%2FHttpException.cs;h=6385ffe7cb325273c38e77e17cc1d297dcaada43;hb=60f847468e0e5740947aea5e0df987bc6b052e77;hp=1280c1a410c310f0c1b5667cffe051c69e6b6dcc;hpb=281b22f9fa650fc88b156357be8891e9f1459daa;p=mono.git diff --git a/mcs/class/System.Web/System.Web/HttpException.cs b/mcs/class/System.Web/System.Web/HttpException.cs index 1280c1a410c..6385ffe7cb3 100644 --- a/mcs/class/System.Web/System.Web/HttpException.cs +++ b/mcs/class/System.Web/System.Web/HttpException.cs @@ -134,7 +134,7 @@ namespace System.Web try { HttpContext ctx = HttpContext.Current; if (ctx != null && ctx.IsCustomErrorEnabled) { - if (http_code != 404) + if (http_code != 404 && http_code != 403) return GetCustomErrorDefaultMessage (); else return GetDefaultErrorMessage (false); @@ -215,33 +215,35 @@ table.sampleCode {{width: 100%; background-color: #ffffcc; }} void WriteFileBottom (StringBuilder builder, bool showTrace) { - builder.Append ("
"); - builder.AppendFormat ("Version information: Mono Version: {0}; ASP.NET Version: {0}\r\n"); + builder.Append ("\r\n-->"); + } else + builder.Append ("\r\n"); } string GetCustomErrorDefaultMessage () @@ -320,7 +322,7 @@ table.sampleCode {{width: 100%; background-color: #ffffcc; }} if (resource_name != null && resource_name.Length > 0) builder.AppendFormat ("

Requested URL: {0}

\r\n", resource_name); - if (baseEx != null && http_code != 404) { + if (showTrace && baseEx != null && http_code != 404 && http_code != 403) { builder.Append ("

Stack Trace:

"); builder.Append ("\r\n
"); WriteTextAsCode (builder, baseEx.ToString ());