[Mono-dev] [PATCH]enableSessionState ReadOnly bugfix
Joel Reed
joelwreed at gmail.com
Thu Aug 9 16:07:20 EDT 2007
Given a web.config with:
<pages enableSessionState="ReadOnly" ...
And a web page with:
<%@ Page Language="C#" %>
<% Response.Write("IsReadOnly = " + Session.IsReadOnly.ToString()); %>
The Response.Write will report back "false". There are two bugs
in System.Web.UI/PageParser.cs that prevents this from working.
First, we must properly propagate the page config setting to the page
parser (see hunk 2 of attached diff).
Second, when we check the EnableSessionState page directive we
must not mess with the page config settings if no such page
directive was provided (see hunk 3).
Hunk 3 looks big but the important change is just the line:
if (atts.ContainsKey("EnableSessionState")) {
Is the attached patch acceptable to apply? I'm not sure hunk 1 is
really required but it felt better to be explicit about
readonlySessionState's initial state.
jr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Honor.enableSessionState.ReadOnly.diff
Type: text/x-diff
Size: 3112 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070809/da2f4b81/attachment.bin
More information about the Mono-devel-list
mailing list