ASP.NET会话状态和多个工作进程 [英] ASP.NET session state and multiple worker processes

查看:209
本文介绍了ASP.NET会话状态和多个工作进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要了解一些关于ASP.NET会话状态,因为它适用于IIS 7和ASP.net 3.5。

I need to understand something about ASP.NET session state, as it applies to IIS 7 and ASP.net 3.5.

如果一个应用程序被配置为使用过程中的会话状态,将这项工作确定,如果有多个工作进程?换句话说,做工作进程共享会话状态?

If an application is configured to use in-process session state, will that work OK if there are multiple worker processes? In other words, do worker processes share session state?

有关IIS 7的默认配置是使用过程中的会话状态和最多10个工作进程分配。这似乎有可能的话,这个默认配置应该工作。我处理已产生的是有一些问题的一个ASP.NET MVC的Web应用程序的公司,他们指责服务器环境。索赔是因为我使用10个工作进程的默认设置,即打破他们的会话状态。我需要知道这是否是实际上是一个准确的说法。我从来不知道一个ASP.NET应用程序不使用默认配置下工作,所以我有点困惑,需要有这样的澄清。

The default configuration for IIS 7 is to use in-process session state and to allocate a maximum of 10 worker processes. It would seem likely then, that this default configuration should work. I'm dealing with a company that has produced an ASP.NET MVC web app that is having some problems, they're blaming the server environment. The claim is that because I'm using the default settings of 10 worker processes, that is breaking their session state. I need to know whether this is in fact an accurate claim. I've never known an ASP.NET app to not work with the default configuration, so I'm a bit confused and need to have this clarified.

推荐答案

有多个工作流程和使用的是InProc似乎并不兼容。

Having multiple worker processes and using InProc does not seem to be compatible.

请参阅this:

如果您启用通过在应用程序的Web.config文件的processModel元素的webGarden属性设置为true网络园模式,请不要使用InProc会话状态模式。如果你这样做,如果同一个会话不同的请求是由不同的工作进程提供可能会丢失数据。

If you enable Web-garden mode by setting the webGarden attribute to true in the processModel element of the application's Web.config file, do not use InProc session state mode. If you do, data loss can occur if different requests for the same session are served by different worker processes.

这篇关于ASP.NET会话状态和多个工作进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆