[Mono-bugs] [Bug 579837] New: System.Configuration.Save() method throws an exception when trying to add an authorization section to an existing Web.config
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sun Feb 14 09:23:21 EST 2010
http://bugzilla.novell.com/show_bug.cgi?id=579837
http://bugzilla.novell.com/show_bug.cgi?id=579837#c0
Summary: System.Configuration.Save() method throws an exception
when trying to add an authorization section to an
existing Web.config
Classification: Mono
Product: Mono: Class Libraries
Version: 2.6.x
Platform: 32bit
OS/Version: openSUSE 11.2
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: test051102 at hotmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.7)
Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)
System.Configuration.Save() method throws a
System.Configuration.ConfigurationErrorsException exception when trying to add
an authorization section to an existing Web.config.
Of course I did take care that XSP2 has all the necessary rights to write to
the Web.config file.
Reproducible: Always
Steps to Reproduce:
1. Create a simple Web Application using Visual Studio 2008
2. Enter the following code to you the Page_Load() method in Default.aspx.cs
Configuration config = WebConfigurationManager.OpenWebConfiguration("~/");
AuthorizationSection auth =
(AuthorizationSection)config.GetSection("system.web/authorization");
AuthorizationRule rule=new AuthorizationRule(AuthorizationRuleAction.Allow);
rule.Users.Add("me");
auth.Rules.Add(rule);
config.Save();
Actual Results:
The last line will throw an exception but Web.config is written anyway.
Howeverm the resulting file does not contain the new authorization section.
Expected Results:
Under Windows XP / IIS the file Web.config is exactly the same as before but it
includes an authorization section. No exception will be thrown.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list