[Mono-bugs] [Bug 74799][Nor] New - browserCaps settings with multiple inner <caps> section throws System.Runtime.Remoting.RemotingException

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 2 May 2005 12:38:10 -0400 (EDT)


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 morpheus4you@gmail.com.

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

--- shadow/74799	2005-05-02 12:38:10.000000000 -0400
+++ shadow/74799.tmp.8724	2005-05-02 12:38:10.000000000 -0400
@@ -0,0 +1,99 @@
+Bug#: 74799
+Product: Mono: Class Libraries
+Version: 1.1
+OS: other
+OS Details: Fedora Core 3
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: morpheus4you@gmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: browserCaps settings with multiple inner <caps> section throws System.Runtime.Remoting.RemotingException
+
+Description of Problem:
+When adding browsercaps settings to the Web.config file that contain a
+<caps> tags within a <caps> tag an HTTP 500 internal server error is thrown.
+
+Steps to reproduce the problem:
+1. Enter this text in the System.Web section of your webapplication's
+Web.config:
+[code]
+<browserCaps>
+  <case match="Gecko/[-\d]+">
+    browser=Netscape
+    frames=true
+    tables=true
+    cookies=true
+    javascript=true
+    javaapplets=true
+    ecmascriptversion=1.5
+    w3cdomversion=1.0
+    css1=true
+    css2=true
+    xml=true
+    tagwriter=System.Web.UI.HtmlTextWriter
+    <case match="rv:1.0[^\.](?'letters'\w*)">
+      version=6.0
+      majorversion=6
+      minorversion=0
+      <case match="^b" with="${letters}">
+        beta=true
+      </case>
+    </case>
+  </case>
+</browserCaps>
+[/code]
+
+2. Call a page from this webproject
+3. A HTTP 500 error will be thrown.
+
+Actual Results:
+
+<pre>
+Description: Error processing request.
+
+Error Message: HTTP 500.
+
+Stack Trace:
+
+System.Runtime.Remoting.RemotingException: Configuration file
+'/var/www/html/InfoBlog/Web.config' could not be loaded: No end tag
+in <0x000e5> System.Runtime.Remoting.RemotingConfiguration:ReadConfigFile
+(System.String filename)
+in <0x0004e> System.Runtime.Remoting.RemotingConfiguration:Configure
+(System.String filename)
+in <0x002b4>
+System.Web.Configuration.WebDefaultConfig:GetConfigFromFileName
+(System.String filepath, System.Web.HttpContext context)
+in <0x00046> System.Web.Configuration.WebDefaultConfig:GetConfig
+(System.String sectionName, System.Web.HttpContext context)
+in <0x00025> System.Web.Configuration.WebDefaultConfig:GetConfig
+(System.String sectionName)
+in <0x00014> System.Web.Configuration.WebConfigurationSettings:GetConfig
+(System.String sectionName)
+in <0x0000a> System.Web.HttpContext:GetAppConfig (System.String name)
+in <0x0002b> System.Web.TraceManager:.ctor ()
+in <0x0003f> System.Web.HttpRuntime:OnFirstRequestStart
+(System.Web.HttpContext context)
+</pre>
+
+Expected Results:
+The error should not have been thrown and the browserCap settings should
+have been correctly parsed.
+
+How often does this happen? 
+Always
+
+Additional Information:
+When you remove the inner case element, so you are left with just a single
+<case> element within <browserCap>, it seems to work. It seems that adding
+a case within a case triggers the error.
+
+More information can be found in 'ASP.NET Settings Schema':
+http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfbrowsercapssection.asp