[Mono-bugs] [Bug 81115][Nor] New - Custom Site Map Provider ignored [w/ fix]

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Mar 11 18:03:57 EDT 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=81115

--- shadow/81115	2007-03-11 17:03:57.000000000 -0500
+++ shadow/81115.tmp.11309	2007-03-11 17:03:57.000000000 -0500
@@ -0,0 +1,59 @@
+Bug#: 81115
+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: Custom Site Map Provider ignored [w/ fix]
+
+Currently, any implementation of a custom site map provider is not used. 
+The patch below addresses this by using the custom provider as specified
+via the web.config settings, rather than throwing NIE.
+
+
+Index: System.Web/XmlSiteMapProvider.cs
+===================================================================
+--- System.Web/XmlSiteMapProvider.cs    (revision 74073)
++++ System.Web/XmlSiteMapProvider.cs    (working copy)
+@@ -36,6 +36,8 @@
+ using System.Configuration;
+ using System.Text;
+ using System.Xml;
++using System.Web.Compilation;
++using System.Web.Configuration;
+ using System.Web.Util;
+ using System.IO;
+ 
+@@ -109,7 +111,14 @@
+                        string siteMapFile = GetNonEmptyOptionalAttribute
+(xmlNode, "siteMapFile");
+ 
+                        if (provider != null) {
+-                               throw new NotImplementedException ();
++                               foreach(SiteMapProvider smp in
+SiteMap.Providers)
++                               {
++                                       if(string.Equals(smp.Name,
+provider, StringComparison.InvariantCulture))
++                                       {
++                                               smp.ParentProvider = this;
++                                               return smp.GetRootNodeCore();
++                                       }
++                               }
+                        } else if (siteMapFile != null) {
+                                throw new NotImplementedException ();
+                        } else {
+
+
+Thanks,
+Mike


More information about the mono-bugs mailing list