gpt4 book ai didi

asp.net-mvc - 在 ASP.NET MVC3 中有哪些无 session Controller 的场景?

转载 作者:行者123 更新时间:2023-12-03 14:45:07 25 4
gpt4 key购买 nike

阅读Guru-Gu's blog post about ASP.NET MVC3 hitting RC , 他说:-

Session-less Controller Support

You can now indicate whether you want a Controller class to use session-state – and if so whether you want it to be read/write or readonly.read/write or readonly.



有人可以解释一下有人可能想要一个无 session Controller 的场景是什么吗?还是只读 Controller ?

我一直在创建一个 separate IIS website which I use to handle all static images/content and then have this same website have session state turned off ...所以没有cookies通过网络发送。这是类似的场景吗?

最佳答案

顾先生对此发表了评论。引用:

The release notes cover this more (you can download them from the download link above). Session state is designed so that only one request from a particular user/session occurs at a time. So if you have a page that has multiple AJAX callbacks happening at once they will be processed in serial fashion on the server. Going session-less means that they would execute in parallel.



这通常是 ASP.NET 中的已知场景。同一用户的 session 对象不是线程安全的。这意味着如果同一个用户(同一个 session id cookie)向使用 session 的页面发送多个请求,这些请求将排队并被串行而不是并行处理。

关于asp.net-mvc - 在 ASP.NET MVC3 中有哪些无 session Controller 的场景?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4139428/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com