SiteMapPath Stops display in ASP.NET 4

We have a SiteMapPath control on the page, and this is related to the default Web.sitemap XML file. We have had this site for many years and recently upgraded to ASP.NET 4.0 in IIS 7.5 on Windows 2008 R2. For some reason, after about 6-12 hours of operation (not exactly when, but it's agreed), SiteMapPath stops loading for everyone. If we restart the application pool or change and save the web.config or XML.sitemap files, SiteMapPath will start loading again.

Does anyone have any ideas what could be causing this? There are no files that keep the file open, which I see using the explorer process.

Thanks,

John

+2
source share
1 answer

We struggled with this for a long time, but ultimately managed to make Microsoft understand what was going on. A story about how MS accessed this hotfix: http://support.microsoft.com/default.aspx?scid=kb;en-US;2472263

In our case, if the first request to the website was from a lifeless device (in our case it was the boss of Russion, Yandex), the site map would be built with cookiless URLs and cached. Then, any devices that support cookies will never work because the Sitemap was cached with the URLs for cookiless sessions. Although the initial symptoms were random, we were ultimately able to narrow it down to reuse the application pool, followed by the first request from this bot.

An alternative workaround that works if you want to force cookies is to make this change to web.config:

<authentication mode="Forms"> <forms cookieless="UseCookies" /> </authentication> 

This causes the Sitemap to be created without the use of cookies.

Hope this helps!

+2
source

All Articles