I wonder if there is a workaround for using the standard XmlSiteMapProvider in a non asp.net application like WinForm / Console or, in my case, VS Unit Test one.
The following code crashes because it cannot create a file path .sitemapinside a private method GetConfigDocument.
.sitemap
GetConfigDocument
XmlSiteMapProvider provider = new XmlSiteMapProvider(); NameValueCollection providerAttributes = new NameValueCollection(); providerAttributes.Add("siteMapFile", "Web.sitemap"); provider.Initialize("XmlSiteMapReader", providerAttributes); provider.BuildSiteMap();
I think it’s the right decision to write another provider.
, . , . , , API , . WinForms URL , .
, , HttpContext Url - , -. , WinForm . , , , , API SiteMap.
API, . , , .
Source: https://habr.com/ru/post/1697421/More articles:How to use .NET 3.0 with Visual Studio 2005? - visual-studio-2008VSTS Code Coverage Error? - unit-testingUse continue or Checked Exceptions when checking and processing objects - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1697419/ways-to-do-related-searches-functionality&usg=ALkJrhgOPTSRMcaZTNfq19PDlub1WoyONwhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1697420/how-would-you-allow-users-to-edit-attachments-in-a-web-application&usg=ALkJrhhjYhx2btcTf-eYWQmTld9rSUkMuQProcess coordination in mod_perl under working MPM - multithreadingДанные виджетов через несколько контроллеров - rubyShould I use Wap for a cellular web page? - websiteShell script for recursive directory lookup and line replacement - scriptingWhy does Hibernate seem to be for short classes? - javaAll Articles