[Mono-bugs] [Bug 80997][Nor] New - web.config sections are not processed

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Mar 2 00:19:09 EST 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by mmorano at mikeandwan.us.

http://bugzilla.ximian.com/show_bug.cgi?id=80997

--- shadow/80997	2007-03-02 00:19:09.000000000 -0500
+++ shadow/80997.tmp.30754	2007-03-02 00:19:09.000000000 -0500
@@ -0,0 +1,63 @@
+Bug#: 80997
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Web
+AssignedTo: mhabersack at novell.com                            
+ReportedBy: mmorano at mikeandwan.us               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: web.config sections are not processed
+
+Description of Problem:
+When trying to port a web application from MS to mono, I ran into a problem
+when I was trying to specify the provider information for a  MySql database
+in the web.config, via a system.data configuration section.  After adding
+the configuration pieces, it still was not finding the class as I expected.
+ I traced the error back to the DbProviderFactoriesConfigurationHandler class.
+
+What happened in this scenario, is that I migrated a web.config from a web
+project started in vs.net 2005 (perhaps a beta version).  In this
+web.config, the default file includes a namespace specifier on the root
+node, such as:
+
+<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
+
+Now, the problem was that the ConfigurationHandler indicated above just
+performed a xmlNode.SelectSingleNodes(".//DbProviderFactories") which is
+not namespace aware, so was skipping this configuration item altogether.
+
+I was able to remove the namespace specification from the root node of
+web.config, and the content was picked up as expected.  This issue probably
+affects other areas of reading config files as well.  
+
+Steps to reproduce the problem:
+1. Modify web.config to include namespace on root node
+2. Settings such as system.data are not loaded, as it can not properly
+resolve child nodes when namespace is provided.
+
+Actual Results:
+Settings are not read
+
+Expected Results:
+Content is read in properly
+
+How often does this happen? 
+always
+
+Additional Information:
+
+It seems people can easily work around this by removing the namespace
+specification in the root xml node.  Just not sure this is captured
+anywhere so people know how to avoid this issue until fixed.
+
+
+Thanks,
+Mike


More information about the mono-bugs mailing list