Posted on: 5/20/2011 6:47:28 AM | Views : 216

After upgrading to .NET 4.0 and IIS7, I'm seeing a strange issue when querying against my web.sitemap file.  For instance, if I execute the following code:
SiteMapNode rootNode = SiteMap.Provider.RootNode; labTest.Text = rootNode.Url;
I would expect to read back "~/default.aspx", but sometimes I end up reading:
[quote]/(A(RAVFN-5DzAEkAAAANzE4MWZlMmUtYWI5OC00Nzg5LTk5YmMtNmEwNWRlNjAxYjU4KwIMaNwwBgRI9_M39CTz q6EZY7U1))/default.aspx[/quote]
This means that whenever I try to locate a node by url
SiteMapNode myNode = SiteMap.Provider.FindSiteMapNode("~/default.aspx");
it doesn't work because it doesn't match the url with the strange characters in front of it.  I'm really stuck and lost on this one, my web.sitemap is provided below:
<?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft. ...

Go to the complete details ...