I wonder whether there is a workaround for using the standard XmlSiteMapProvider within a non asp.net application, like WinForm/Console or, in my case, VS Unit Test one.
The following code fails, because it cannot create a path to the .sitemap file inside a private GetConfigDocument method.
XmlSiteMapProvider provider = new XmlSiteMapProvider(); NameValueCollection providerAttributes = new NameValueCollection(); providerAttributes.Add("siteMapFile", "Web.sitemap"); provider.Initialize("XmlSiteMapReader", providerAttributes); provider.BuildSiteMap();
I feel the right solution is to write another provider.