[Mono-bugs] [Bug 81988][Nor] New - XmlSiteMapProvider does not function properly after first load

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Jul 2 13:08:44 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 lifewarped at yahoo.com.

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

--- shadow/81988	2007-07-02 13:08:44.000000000 -0400
+++ shadow/81988.tmp.6231	2007-07-02 13:08:44.000000000 -0400
@@ -0,0 +1,66 @@
+Bug#: 81988
+Product: Mono: Class Libraries
+Version: 1.2
+OS: other
+OS Details: FreeBSD 6.2
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Web
+AssignedTo: mhabersack at novell.com                            
+ReportedBy: lifewarped at yahoo.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: XmlSiteMapProvider does not function properly after first load
+
+Description of Problem:
+We have 2 navigational panels on our site (we are migrating from .NET 2 to Mono .NET 2) one 
+that looks for the top level sitemap node to show the section of the site you are on and one that 
+lists the current navigation under that section (as well as displaying where you are). This works 
+fine on Windows as it has been a part of our site for a while however upon migration we have not 
+been able to get this working more then once per the runtime of the app. This is to say it works 
+flawlessly on the first hit it takse from a user, while failing every othertime untill the app is 
+restarted. The navigation is a control with no persistance thus there should be no persistant 
+state for this control across pages.
+
+The following code section works perfectly on windows as well as on mono for the first hit of the 
+aps runtime then simply stops as if the sitemap provider doesnt provide us with the currecnt 
+node. We have checked all of our paths in our site map, even writing down what pages work on 
+first hit, restarting the app then using them as what we hit the second time... and always has the 
+same results.
+
+Please note that this calss is only a section. The render method was also overloaded. Id give you 
+more information but i do not know how to debug further short of poking at it and hoping it 
+works.
+
+        public class TopNavigation : MacUX.Website.WebControls.WebControlSuppressedSpan
+        {
+                protected SiteMapNode mainpage;
+                protected SiteMapNodeCollection path;
+
+                public TopNavigation()
+                {
+                        SiteMapProvider provider = System.Web.SiteMap.Provider;
+
+                        this.path = new SiteMapNodeCollection();
+
+                        SiteMapNode cursornode = provider.CurrentNode;
+
+                        if (cursornode != null)
+                        {
+
+                                while (!cursornode.Equals(provider.RootNode))
+                                {
+                                        path.Add(cursornode);
+                                        cursornode = cursornode.ParentNode;
+                                }
+                        }
+
+                }
+       }
+
+Glenn R. Martin
+http://www.hybrid-mobile.com


More information about the mono-bugs mailing list