SiteMapPath Stops Displaying in ASP.NET 4

空扰寡人 提交于 2019-12-04 16:44:07

We struggled with this for a LONG time, but were eventually able to get Microsoft to figure out what was going on. Short story is MS has addressed it with 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 cookieless device (in our case it was some Russion bot, Yandex), the sitemap would be built with cookiless URLs and cached. Then, any devices that supported cookies would never work because of the way the sitemap was cached with URLs for cookiless sessions. While initial the symptoms were random, we eventually were able to narrow it to an app pool recycle followed by the first request from this bot.

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

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

This forces the sitemap to be built without using cookieless URLs.

Hope this helps!!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!