使用SqlServer丢失会话 [英] Sessions Lost With SqlServer

查看:169
本文介绍了使用SqlServer丢失会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用SQL Server 2000存储会话状态的应用程序遇到问题。该应用程序是Win2003上的ASP.NET 2.0。


偶尔所有会话都会丢失,导致应用程序崩溃。


我知道InProc会话存在与防病毒产品,目录删除,配置更改有关的问题....并且之前有问题InProc,但现在我正在使用SQL Server它应该是持久的。


如果我重置IIS,会话会神奇地回来。当InProc永远丢失之前。


有什么建议吗?

Having trouble with an application which is using SQL Server 2000 to store session state. The App is ASP.NET 2.0 on Win2003.

Occasionally all sessions are lost at once, causing the app to break.

I know there are issues with InProc sessions relating to antivirus products, directory deletes, config changes .... and had the problem InProc before, but now I''m using SQL Server it should be persistent.

If I do an IIS reset the sessions magically come back. When InProc before they were lost permenantly.

Any suggestions ?

推荐答案

顺便说一句我正在使用网络花园
By the way I am using a web garden



我使用网络花园的方式
By the way I am using a web garden



我不是熟悉网络花园所以我花了一些时间来查找你可能遇到这些问题的原因。

我发现了一个非常丰富的对话,发现以下内容非常有趣。它解释了为什么在使用Web园时遇到inProc会话存储的问题:

I am not familiar with web gardens so I took some time to look up why you might be encountering these issues.

I found a very informative conversation posted and found the following quite interesting. It explains why you would be having problems with inProc Session storage while using a web garden:


如果您的代码依赖于会话,并启用了Web园区功能(将应用程序池的最大进程设置为> 1),您将体验到这种好奇的消息。 "间歇"失去会话(或无法解释的注销)。


问题是工作流程回收,甚至应用程序域重启(其他可能导致会话或强制注销的问题) 。相反,只是网络花园功能可以使您的请求最终被定向到一个新的工作进程,而您的会话不存在。


底线:如果使用会话并启用Web园,您最好启用StateServer或SQLServer进行会话管理。
If you have code that relies on sessions, and you enable the web garden feature (set max processes to > 1 for an app pool), you will experience this "curious" "intermittent" loss of sessions (or "unexplainable logouts").

The problem isn''t work process recycling, nor even application domain restarts (other problems that can kill sessions or force logouts). Instead, it''s just that the web garden feature can cause your requests to eventually be directed to a new worker process where the session you had is not existing.

Bottom line: if using sessions and you enable web gardens, you had better enable StateServer or SQLServer for session management.



由于您使用SQLServer存储会话状态,因此您不应该遇到这些问题。


您是否确定应用程序池设置正确?

您是否确定了会话丢失时的情景?


-Frinny

Since you''re using SQLServer to store your session state you shouldn''t be experiencing these problems.

Have you made sure that your Application Pool settings are correct?
Have you determined the scenario when the Sessions are lost?

-Frinny


是的,In Proc有很多问题。我已经转移到SQL Server会话以避免这些但仍然每天丢失所有会话几次。当使用In Proc时,它们已经消失了,但是在SQL Server 200支持的会话中,它们会重新启动IIS。
Hi, yes there are a number of problems with In Proc. I have moved to SQL Server sessions to avoid these but still lose all sessions at once a couple of times a day. When using In Proc they were gone for good, but with SQL Server 200 backed sessions they come back with an IIS reset.


这篇关于使用SqlServer丢失会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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