Author: kostat
Date: 2007-05-28 10:50:35 -0400 (Mon, 28 May 2007)
New Revision: 78063
Modified:
trunk/mcs/class/System.Web/System.Web/HttpException.cs
Log:
TARGET_J2EE: do not suggest viewing exception on local machines for portal
Modified: trunk/mcs/class/System.Web/System.Web/HttpException.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpException.cs 2007-05-28
14:48:44 UTC (rev 78062)
+++ trunk/mcs/class/System.Web/System.Web/HttpException.cs 2007-05-28
14:50:35 UTC (rev 78063)
@@ -161,7 +161,12 @@
{
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). It could, however, be viewed by browsers
running on the local server machine.</p>
+ 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.IsPortletRequest ?
String.Empty :
+#endif
+ " 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>
<table class=""sampleCode""><tr><td><pre>
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches