asp.net-mvc – 在ASP.NET MVC3中有一个无会话控制器的情况是什么?

前端之家收集整理的这篇文章主要介绍了asp.net-mvc – 在ASP.NET MVC3中有一个无会话控制器的情况是什么?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
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.

有人可以解释一些情景有人想要拥有无会话控制器吗?或只读控制器?

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

解决方法

评论了这一点。引用:

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中一个已知的场景。同一用户的会话对象不是线程安全的。这意味着如果同一个用户(相同的会话id cookie)向使用会话的页面发送多个请求,那么这些请求将被排队并且将被并行处理,而不是并行处理。

原文链接:https://www.f2er.com/aspnet/252320.html

猜你在找的asp.Net相关文章