Asp.net mvc 4 - Need to use sessions but can't use cookies

 ̄綄美尐妖づ 提交于 2019-12-20 04:22:18

问题


I am working on an ASP.NET MVC 4 application.

I need to use the session for storing various things. My mandate is to not use cookies.

Is there a way I can work through this? I have been told that ASP.NET MVC 4 will not work in cookie-less mode.

Is there any other alternative way?


回答1:


Edit your web.config

<sessionState cookieless="true" timeout="20" />


来源:https://stackoverflow.com/questions/15176355/asp-net-mvc-4-need-to-use-sessions-but-cant-use-cookies

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