每个网站的会话变量的最大数量. [英] Maximum number of session variables per website.

查看:67
本文介绍了每个网站的会话变量的最大数量.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

只想问一下每个网站上是否存在最大会话变量数
因为我使用vb在asp.net中实现了网站构建.
它工作正常,但突然出现用户遇到的错误
对象引用未设置为对象的实例."

我不知道错误从哪里开始,而且堆栈跟踪也没有提供触发错误的确切代码.

也许我的会话变量达到了最大值?

请帮我...

谢谢,

Enan

Hi to all,

Just want to ask if there''s a maximum number of session variables per website
because I''d implemented a website build in asp.net using vb.
It works fine but suddenly user''s experienced error
"object reference not set to an instance of an object."

I don''t know where the error initiated and my stack trace doesn''t give me the exact code that trigger the error.

Maybe, my session variables reach the maximum?

please help me guys...

thanks,

Enan

推荐答案

除非您做过非常愚蠢的事情,否则您将不会达到这个极限.

您得到的错误也与此无关.该错误是因为您的代码假定您在不存在时返回了一个对象,然后尝试设置对该对象执行方法的属性.由于该对象为Nothing,因此无需设置属性或执行方法.

堆栈跟踪将非常准确,并告诉您错误发生在哪种方法.调试该方法中的代码并找到Nothing的对象是您的工作.
Unless you''ve done something incredibly stupid, you''re not going to hit that limit.

The error you''re getting has nothing to do with it either. That error is because your code assumed you got back an object when you didn''t and then you tried to set a property of execute a method on that object. Since the object was Nothing, there''s nothing to set a property or execute a method on.

The stack trace will be extremely accurate and tell you in which method the error occured. It''s your job to debug the code in that method and find the object that is Nothing.


我为每个过程保存了标记,以便我可以验证错误的出处起源,我发现错误是由于其他用户交叉的会话变量引起的.因此,我在Google上搜索了它,发现了它:

http://msdn.microsoft.com/zh-CN/magazine/cc163577.aspx

因此,我将以下行添加到我的web.config中,以解决来自不同用户的会话变量的问题.

httpRuntime enableKernelOutputCache ="false"


谢谢,


恩南(Enan)
I''d saved markers for every process so that I could validate where the error is originated and I''ve found out that the error is because of session variables crossed from other users. So, I google it and found this:

http://msdn.microsoft.com/en-us/magazine/cc163577.aspx

So, I add the line below to my web.config to address the problem in session variables crossing from different users.

httpRuntime enableKernelOutputCache="false"


thanks,


Enan


这篇关于每个网站的会话变量的最大数量.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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