Question

Do Areas in Mvc2 have session isolation or do they share the same session as the rest of the application for the same user.

Was it helpful?

Solution

They are part of the same ASP.NET application and therefore they share the same session.

OTHER TIPS

Well I dont seem to find that true as my request for the same session set in different area of mvc comes as null, where as in that area it works fine

But they do, just like @Charlino said, it uses ASP.NET's session. Maybe you don't have just areas, but have actually separate virtual directories/applications.

Are you using Session[], or TempData[]. I don't think it makes a difference, but TempData is a MVC mechanism so might have an extra hook in there.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top