Author: igorz
Date: 2008-01-30 04:45:26 -0500 (Wed, 30 Jan 2008)
New Revision: 94364
Modified:
trunk/mcs/class/System.Web/System.Web/HttpException.cs
Log:
TARGET_J2EE:
customize default error message for portal
Modified: trunk/mcs/class/System.Web/System.Web/HttpException.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpException.cs 2008-01-30
07:20:11 UTC (rev 94363)
+++ trunk/mcs/class/System.Web/System.Web/HttpException.cs 2008-01-30
09:45:26 UTC (rev 94364)
@@ -161,10 +161,26 @@
{
StringBuilder builder = new StringBuilder ();
WriteFileTop (builder, "Runtime Error");
- builder.Append (@"<p><strong>Description:</strong> An
application error occurred on the server. The current custom error settings for
this application prevent the details of the application error from being viewed
remotely (for security reasons)." + (
#if TARGET_J2EE //on portal we cannot know if we run locally
- !HttpContext.Current.IsServletRequest ?
String.Empty :
+ if (!HttpContext.Current.IsServletRequest)
+ builder.Append (
+@"<p><strong>Description:</strong> An application error occurred on the
server. The current custom error settings for this application prevent the
details of the application error from being viewed (for security reasons).</p>
+<p><strong>Details:</strong> To enable the details of this specific error
message to be viewable, please create a <customErrors> tag within a
"web.config" configuration file located in the root directory of the
current web application. This <customErrors> tag should then have its
"mode" attribute set to "Off".</p>
+<table class=""sampleCode""><tr><td><pre>
+
+<!-- Web.Config Configuration File -->
+
+<configuration>
+ <system.web>
+
+ <customErrors mode="Off"/>
+ </system.web>
+</configuration></pre>
+ </td></tr></table><br/>
+");
+ else
#endif
+ builder.Append (@"<p><strong>Description:</strong> An
application error occurred on the server. The current custom error settings for
this application prevent the details of the application error from being viewed
remotely (for security reasons)." + (
" It could, however, be viewed by browsers
running on the local server machine.")
+ @"</p>
<p><strong>Details:</strong> To enable the details of this specific error
message to be viewable on remote machines, please create a <customErrors>
tag within a "web.config" configuration file located in the root
directory of the current web application. This <customErrors> tag should
then have its "mode" attribute set to "Off".</p>
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches