Asp.net MVC 4 - 需要使用会话,但不能使用cookies [英] Asp.net mvc 4 - Need to use sessions but can't use cookies
本文介绍了Asp.net MVC 4 - 需要使用会话,但不能使用cookies的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我工作的一个 ASP.NET MVC 4 应用程序。
I am working on an ASP.NET MVC 4 application.
我需要使用会话来存储各种事情。我的任务是不使用cookies。
I need to use the session for storing various things. My mandate is to not use cookies.
有没有一种方法,我可以通过这个工作吗?我已被告知,ASP.NET MVC 4不会在cookie的模式下工作。
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.
有没有其他替代方法?
推荐答案
编辑你的web.config
Edit your web.config
<sessionState cookieless="true" timeout="20" />
这篇关于Asp.net MVC 4 - 需要使用会话,但不能使用cookies的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文