如何调试会话状态提供程序 [英] How do I debug the session state provider

查看:101
本文介绍了如何调试会话状态提供程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在测试速度作为会话状态提供者(CTP3)。

但是,它似乎非常不稳定。我所做的只是将会话状态提供程序从StateServer切换到Velocity,并立即得到以下错误:

I am testing out velocity as a session state provider(CTP3).

However, it seems to be very unstable. What I have done is just switched the session state provider from StateServer to Velocity and immediately, I got the following error :

[DataCacheException: ErrorCode<ERRCA0003>:Cache::PutAndUnlock: One of the required arguments contains a null reference.]

   Microsoft.Data.Caching.DataCache.PutAndUnlock(String key, Object value, DataCacheLockHandle lockHandle, TimeSpan timeout) +167

   Microsoft.Data.Caching.DataCacheSessionStoreProvider.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem) +660

   System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +560

   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68

   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75



更糟糕的是,我无法再使用浏览器访问我的应用。我必须关闭浏览器并重新开始。即使这样,我也会在某些时候遇到上述错误。

以防万一,我的应用程序将DataTable存储在StateServer没有问题序列化的会话中。

另外,与State Server不同,如果我回收IIS工作进程,我也会遇到上述异常。

如何查找出现的问题?

编辑:找到了在另一个线程中,它与超时值有关。但是,即使我将超时设置为"59"后,我也不再看到此异常。分钟,我会随机丢失我的会话信息(似乎是因为我使用会话来存储登录状态并获得了重新登录提示),这只是在几个异步回发内,即少于30秒)。

What is even worse, I can no longer access my app using the browser. I have to closed the browser and start again. Even then, I would hit the above error at some point.

Just in case, my app stores DataTable in the session which the StateServer has no problem serializing them.

Also, unlike the State Server, if I recycle IIS worker process, I would hit the above exception as well.

How can I trace what went wrong ?

found the issue in another thread, it has something to do with the timeout value. However, even though I no longer see this exception after I set the timeout to "59" minutes, I would randomly lost my session info(seems to be as I use session to store login status and got the relogin prompt) and that would be just within a few async post back, i.e. less than 30 seconds).

推荐答案

Hi


这篇关于如何调试会话状态提供程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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