Author: mhabersack
Date: 2007-08-27 06:17:05 -0400 (Mon, 27 Aug 2007)
New Revision: 84868
Modified:
tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration/ChangeLog
tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration/PagesConfiguration.cs
tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration/PagesConfigurationHandler.cs
tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration_2.0/PagesEnableSessionState.cs
tags/mono-1-2-5/mcs/class/System.Web/System.Web.UI/ChangeLog
tags/mono-1-2-5/mcs/class/System.Web/System.Web.UI/PageParser.cs
Log:
committing the fix for bug #82472 again - previous commit (r84521) somehow
disappeared.
Modified:
tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration/ChangeLog
===================================================================
--- tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration/ChangeLog
2007-08-27 09:02:04 UTC (rev 84867)
+++ tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration/ChangeLog
2007-08-27 10:17:05 UTC (rev 84868)
@@ -1,3 +1,8 @@
+2007-08-10 Gert Driesen <[EMAIL PROTECTED]>
+
+ * PagesConfigurationHandler.cs: Use enum for EnableSessionState.
+ * PagesConfiguration.cs: Use enum for EnableSessionState.
+
2007-05-01 Marek Habersack <[EMAIL PROTECTED]>
* HttpCapabilitiesBase.cs: move the User-Agent code to a separate
Modified:
tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration/PagesConfiguration.cs
===================================================================
---
tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration/PagesConfiguration.cs
2007-08-27 09:02:04 UTC (rev 84867)
+++
tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration/PagesConfiguration.cs
2007-08-27 10:17:05 UTC (rev 84868)
@@ -36,7 +36,7 @@
class PagesConfiguration
{
internal bool Buffer = true;
- internal string EnableSessionState = "true";
+ internal PagesEnableSessionState EnableSessionState =
PagesEnableSessionState.True;
internal bool EnableViewState = true;
internal bool EnableViewStateMac = false;
internal bool SmartNavigation = false;
Modified:
tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration/PagesConfigurationHandler.cs
===================================================================
---
tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration/PagesConfigurationHandler.cs
2007-08-27 09:02:04 UTC (rev 84867)
+++
tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration/PagesConfigurationHandler.cs
2007-08-27 10:17:05 UTC (rev 84868)
@@ -48,11 +48,22 @@
attvalue = AttValue ("enableSessionState", section);
if (attvalue != null) {
- if (attvalue != "true" && attvalue != "false"
&& attvalue != "ReadOnly")
+ switch (attvalue) {
+ case "true":
+ config.EnableSessionState =
PagesEnableSessionState.True;
+ break;
+ case "ReadOnly":
+ config.EnableSessionState =
PagesEnableSessionState.ReadOnly;
+ break;
+ case "false":
+ config.EnableSessionState =
PagesEnableSessionState.False;
+ break;
+ default:
HandlersUtil.ThrowException ("The
'enableSessionState' attribute"
+ " is case sensitive and must
be one of the following values:"
+ " false, true, ReadOnly.",
section);
- config.EnableSessionState = attvalue;
+ break;
+ }
}
attvalue = AttValue ("enableViewState", section);
Modified:
tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
===================================================================
--- tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
2007-08-27 09:02:04 UTC (rev 84867)
+++ tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog
2007-08-27 10:17:05 UTC (rev 84868)
@@ -1,3 +1,7 @@
+2007-08-10 Gert Driesen <[EMAIL PROTECTED]>
+
+ * PagesEnableSessionState.cs: Marked internal on 1.0 profile.
+
2007-07-16 Vladimir Krasnov <[EMAIL PROTECTED]>
* ProfileGroupSettingsCollection.cs: added ResetInternal internal
Modified:
tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration_2.0/PagesEnableSessionState.cs
===================================================================
---
tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration_2.0/PagesEnableSessionState.cs
2007-08-27 09:02:04 UTC (rev 84867)
+++
tags/mono-1-2-5/mcs/class/System.Web/System.Web.Configuration_2.0/PagesEnableSessionState.cs
2007-08-27 10:17:05 UTC (rev 84868)
@@ -28,14 +28,17 @@
using System.Resources;
-#if NET_2_0
namespace System.Web.Configuration
{
- public enum PagesEnableSessionState
- {
- False = 0,
- ReadOnly = 1,
- True = 2
- }
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ enum PagesEnableSessionState
+ {
+ False = 0,
+ ReadOnly = 1,
+ True = 2
+ }
}
-#endif
Modified: tags/mono-1-2-5/mcs/class/System.Web/System.Web.UI/ChangeLog
===================================================================
--- tags/mono-1-2-5/mcs/class/System.Web/System.Web.UI/ChangeLog
2007-08-27 09:02:04 UTC (rev 84867)
+++ tags/mono-1-2-5/mcs/class/System.Web/System.Web.UI/ChangeLog
2007-08-27 10:17:05 UTC (rev 84868)
@@ -1,7 +1,21 @@
+2007-08-10 Gert Driesen <[EMAIL PROTECTED]>
+
+ * PageParser.cs: Replace enableSessionState and readOnlySessionState
+ bools with enum backed field. Move 1.0 profile code for checking value
+ of EnableSessionState pages config to PagesConfigurationHandler.
+ Fixes bug #82392 for 1.0 profile.
+
+2007-08-09 Marek Habersack <[EMAIL PROTECTED]>
+
+ * PageParser.cs: honor web.config enableSessionState
+ ReadOnly setting instead of overwriting based on default value for
+ page directive EnableSessionState. Patch from Joel Reed
+ <[EMAIL PROTECTED]>, thanks! Fixes bug #82392
+
2007-07-24 Igor Zelmanovich <[EMAIL PROTECTED]>
* ClientScriptManager.cs: fixed: GetCallbackEventReference method.
-
+
2007-07-23 Igor Zelmanovich <[EMAIL PROTECTED]>
* Page.cs: refactoring: __doPostBack client script
Modified: tags/mono-1-2-5/mcs/class/System.Web/System.Web.UI/PageParser.cs
===================================================================
--- tags/mono-1-2-5/mcs/class/System.Web/System.Web.UI/PageParser.cs
2007-08-27 09:02:04 UTC (rev 84867)
+++ tags/mono-1-2-5/mcs/class/System.Web/System.Web.UI/PageParser.cs
2007-08-27 10:17:05 UTC (rev 84868)
@@ -43,14 +43,13 @@
[AspNetHostingPermission (SecurityAction.LinkDemand, Level =
AspNetHostingPermissionLevel.Minimal)]
public sealed class PageParser : TemplateControlParser
{
- bool enableSessionState = true;
+ PagesEnableSessionState enableSessionState =
PagesEnableSessionState.True;
bool enableViewStateMac = true;
- bool smartNavigation = false;
+ bool smartNavigation;
bool haveTrace;
bool trace;
bool notBuffer;
TraceMode tracemode;
- bool readonlySessionState;
string responseEncoding;
string contentType;
int codepage = -1;
@@ -112,24 +111,7 @@
#endif
notBuffer = !ps.Buffer;
-#if NET_2_0
- switch (ps.EnableSessionState) {
- case PagesEnableSessionState.True:
- case PagesEnableSessionState.ReadOnly:
- enableSessionState = true;
- break;
-
- default:
- enableSessionState = false;
- break;
- }
-#else
- if (String.Compare (ps.EnableSessionState, "true",
true, CultureInfo.InvariantCulture) == 0)
- enableSessionState = true;
- else
- enableSessionState = false;
-#endif
-
+ enableSessionState = ps.EnableSessionState;
enableViewStateMac = ps.EnableViewStateMac;
smartNavigation = ps.SmartNavigation;
validateRequest = ps.ValidateRequest;
@@ -165,23 +147,23 @@
// note: the 'enableSessionState' configuration
property is
// processed in a case-sensitive manner while the
page-level
// attribute is processed case-insensitive
- string enabless = GetString (atts,
"EnableSessionState", enableSessionState.ToString ());
+ string enabless = GetString (atts,
"EnableSessionState", null);
if (enabless != null) {
- readonlySessionState = (String.Compare
(enabless, "readonly", true) == 0);
- if (readonlySessionState == true ||
String.Compare (enabless, "true", true) == 0) {
- enableSessionState = true;
- } else if (String.Compare (enabless, "false",
true) == 0) {
- enableSessionState = false;
- } else {
+ if (String.Compare (enabless, "readonly", true)
== 0)
+ enableSessionState =
PagesEnableSessionState.ReadOnly;
+ else if (String.Compare (enabless, "true",
true) == 0)
+ enableSessionState =
PagesEnableSessionState.True;
+ else if (String.Compare (enabless, "false",
true) == 0)
+ enableSessionState =
PagesEnableSessionState.False;
+ else
ThrowParseException ("Invalid value for
enableSessionState: " + enabless);
- }
}
string cp = GetString (atts, "CodePage", null);
if (cp != null) {
if (responseEncoding != null)
ThrowParseException ("CodePage and
ResponseEncoding are " +
- "mutually
exclusive.");
+ "mutually exclusive.");
int codepage = 0;
try {
@@ -436,7 +418,10 @@
}
internal bool EnableSessionState {
- get { return enableSessionState; }
+ get {
+ return enableSessionState ==
PagesEnableSessionState.True ||
+ ReadOnlySessionState;
+ }
}
internal bool EnableViewStateMac {
@@ -448,7 +433,9 @@
}
internal bool ReadOnlySessionState {
- get { return readonlySessionState; }
+ get {
+ return enableSessionState ==
PagesEnableSessionState.ReadOnly;
+ }
}
internal bool HaveTrace {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches