-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SiteMapPath not taking cookie-less uri into account #407
Comments
Hello. The official stance of Microsoft is that cookieless sessions are not supported in MVC. If you still want to go down that road, the thing that changed which causes the cookieless sessions not to work is that a fake You can use the actual v2 and v3 had a bug that many people were relying on in their configuration - route values that were written on a request went into the primary cache. This made it seem like it saved the ids for the current user across requests when navigating around the site. However, the cache was shared between all users so the next user that came along would overwrite the RouteValue settings. This has been fixed in v4, but is also a source of confusion because configurations that seemed to work before no longer work. I have created a demo project based off of your configuration showing one way you could get your breadcrumbs to work using Preserved Route Parameters. There is also a post titled How to Make MvcSiteMapProvider Remember a User's Position that goes into some detail about how this works (which has more demos). |
Hi, Thank you for your quick answer ! With your comments I was able to understand the behavior of the preservedRouteParameters attribute. The SessionID is working well with parameter includeAmbientValuesInUrl now. So ... many thanks ! :) I was able to fully upgrade my project to MVC5. |
Hi,
we are facing an issue while upgrading my project from MVC3 to MVC5 (and so MvcSiteMapProvider 2.x to MvcSiteMapProvider 4.x).
In our project, we are obliged to use cookie-less uris and everything was working fine with MvcSiteMapProvider 2.x. Our SiteMap path was displaying correctly with the session ID in the url but when upgrading to MVC5 and MvcSiteMapProvider 4.x, the session ID is not there now.
We have also lost our preserved parameters :(
I was able to reproduce it in a very simple project.
Here is a gist with my configuration : https://gist.github.com/vtherry/2403b94e53c6a96c8bda
Please let met know if I am using the framework the wrong way or if cookie-less sessions are not supported anymore but there is still the issue with preserved parameters not being displayed in uris :(
Thank you for your support !
Vincent
The text was updated successfully, but these errors were encountered: