开发者

How to enable session only in specific view and disable it on others in ASP.NET MVC

开发者 https://www.devze.com 2022-12-08 06:43 出处:网络
i need to use session only on a few views in my MVC project. These views are not visible to web crawlers.

i need to use session only on a few views in my MVC project. These views are not visible to web crawlers. I use cookieless="AutoDetect" so web-crawles(and users with cookies disabled) gets ugly url from IIS( ie "(S(hkec1uq1onbt0xafixedjc45))/en/home.mvc") even on pages that doesn't need session.

Is there any way how to enable session only on speci开发者_运维知识库fic pages and disable on others?

Thank you.


Disabling session is not exactly prefered "out of the box" for ASP.NET MVC. I think this post will get you going down the right path.

0

精彩评论

暂无评论...
验证码 换一张
取 消