超时值&会话变量 [英] Timeout value & session variables

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

问题描述

我支持几个内部网站点,其中一个站点没有状态。尽管

内容具有ASP扩展,但它都是HTML呈现的。网站没有会话或

正在管理的应用程序变量。网站没有global.asa。 IIS管理器

将站点超时设置为20分钟。


我们必须在页面中添加ASP包含,并且ASP包含我们的

第一个会话变量。然后用户开始抱怨超时并且因为会话变量被蒸发而被重定向到注销页面。用户

请求4小时 - 240分钟超时。这是在

网站的IIS管理器中设置的,但它没有用。我们在会话中添加了设置了超时的global.asa

on_start例程,即使我们可以显示超时变量在

240分钟,如果我们等待30分钟并按下刷新在显示的页面上,它

采用逻辑路径指示会话变量不再设置。


任何人都知道我们为什么遇到这种行为?

解决方案

" doug" < dm ***** @ newsgroups.nospamwrote in message

news:0A ************************* ********* @ microsof t.com ...


我支持几个内部网站点,其中一个站点没有状态。尽管

内容具有ASP扩展,但它都是HTML呈现的。网站没有会话





正在管理的应用程序变量。网站没有global.asa。 IIS管理器

将站点超时设置为20分钟。


我们必须在页面中添加ASP包含,并且ASP包含我们的

第一个会话变量。用户然后开始抱怨超时和





重定向到注销页面因为会话变量已经蒸发。用户

请求4小时 - 240分钟超时。这是在

网站的IIS管理器中设置的,但它没有用。我们在会话中添加了设置了超时的global.asa

on_start例程,即使我们可以显示超时变量在

240分钟,如果我们等待30分钟并按下刷新在显示的页面上,



它是


采用逻辑路径指示会话变量不再设置。


任何人都知道我们为什么遇到这种行为?



应用程序池最有可能是回收利用。


查看网站运行的应用程序池的属性。你可能需要调整回收和性能标签,以便

工作流程在正常使用期间不会定期回收,并且空闲超时比您需要的会话超时长。


-

Anthony Jones - MVP ASP / ASP.NET





如果这是Windows 2003 IIS 6.0服务器,请检查网站的

应用程序池属性。闲置后(以分钟为单位)''验证设置''关闭工作程序进程

'。


IIS6的默认设置是关闭工作人员进程(网站/应用程序

池实例)如果没有新请求进入20分钟。在这个

的情况下,所有进程中的会话都将丢失。


谢谢。


此致,


WenJun Zhang


微软在线社区支持


======== ==========================================


通过电子邮件收到我的帖子通知?请参阅:
http:// msdn。 microsoft.com/subscripti...ult.aspx#notif

ications。


注意:MSDN托管新闻组支持服务适用于非-urgent issues

如果社区或Microsoft支持工程师在1个工作日内做出初步回复是可以接受的。请注意,每个跟随

的响应可能需要大约2个工作日作为支持

专业人士与您合作可能需要进一步调查才能达到

最有效的分辨率。该产品不适用于需要紧急,实时或基于电话的交互或复杂的b $ b项目分析和转储分析问题的情况。这种性质的问题最好通过联系

微软客户支持服务(CSS)处理,与专门的微软支持工程师合作处理


< a rel =nofollowhref =http://msdn.microsoft.com/subscriptions/support/default.aspxtarget =_ blank> http://msdn.microsoft.com/subscripti...t/default .aspx 。


=============================== ===================

此帖子按原样提供。没有保证,也没有赋予任何权利。


就是这样。谢谢。我不得不说我不是重叠选项的忠实粉丝

这种性质。


doug


" Anthony Jones"写道:


" doug" < dm ***** @ newsgroups.nospamwrote in message

news:0A ************************* ********* @ microsof t.com ...


我支持几个内部网站点,其中一个站点没有状态。尽管

内容具有ASP扩展,但它都是HTML呈现的。网站没有会话





正在管理的应用程序变量。网站没有global.asa。 IIS管理器

将站点超时设置为20分钟。


我们必须在页面中添加ASP包含,并且ASP包含我们的

第一个会话变量。用户然后开始抱怨超时和





重定向到注销页面因为会话变量已经蒸发。用户

请求4小时 - 240分钟超时。这是在

网站的IIS管理器中设置的,但它没有用。我们在会话中添加了设置了超时的global.asa

on_start例程,即使我们可以显示超时变量在

240分钟,如果我们等待30分钟并按下刷新在显示的页面上,



它是


采用逻辑路径指示会话变量不再设置。


任何人都知道我们为什么遇到这种行为?



应用程序池最有可能是回收利用。


查看网站运行的应用程序池的属性你可能需要调整回收和性能标签,以便在正常使用期间不定期回收

工作流程

空闲超时比你需要的会话超时长。


-

Anthony Jones - MVP ASP / ASP.NET


I support several intranet sites one of which had NO STATE. Even though
content has ASP extensions, it was all rendered HTML. Site had NO session or
application variables being managed. Site had no global.asa. IIS Manager
had site timeout set to 20 minutes.

We had to add an ASP include to pages, and that ASP include contained our
first session variable. Users then started complaining of timeouts and being
redirected to logout pages because session variable evaporated. Users
requested a 4 hour - 240 minute timeout. This was set in IIS Manager on
site, and it didn''t work. We added global.asa with timeout set in session
on_start routine, and even though we could display the timeout variable at
240 minutes, if we wait 30 minutes and pressed refresh on page displayed, it
took logic path indicating session variable no longer set.

Anyone know why we are experiencing this behavior?

解决方案

"doug" <dm*****@newsgroups.nospamwrote in message
news:0A**********************************@microsof t.com...

I support several intranet sites one of which had NO STATE. Even though
content has ASP extensions, it was all rendered HTML. Site had NO session

or

application variables being managed. Site had no global.asa. IIS Manager
had site timeout set to 20 minutes.

We had to add an ASP include to pages, and that ASP include contained our
first session variable. Users then started complaining of timeouts and

being

redirected to logout pages because session variable evaporated. Users
requested a 4 hour - 240 minute timeout. This was set in IIS Manager on
site, and it didn''t work. We added global.asa with timeout set in session
on_start routine, and even though we could display the timeout variable at
240 minutes, if we wait 30 minutes and pressed refresh on page displayed,

it

took logic path indicating session variable no longer set.

Anyone know why we are experiencing this behavior?

Most likely the application pool is recycling.

Take a look at the properties of the Application pool the site runs in. You
will probably need to adjust the recycling and preformance tabs so that the
workprocess is not recycled on a regular basis during normal use and that
the idle timeout is longer than the session timeout you require.

--
Anthony Jones - MVP ASP/ASP.NET


Hi,

If this is a Windows 2003 IIS 6.0 server, please check the site''s
application pool property. Verify the setting ''Shutdown worker processes
after being idle for(time in minutes)''.

The default setting of IIS6 is to shut down worker processes(web site/app
pool instances) if there is no new requests come in for 20 mins. In this
case, all the in-process sessions will be lost.

Thanks.

Sincerely,

WenJun Zhang

Microsoft Online Community Support

==================================================

Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at:

http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.


That was it. Thanks. I have to say I''m not a big fan of overlapping options
of this nature.

doug

"Anthony Jones" wrote:

"doug" <dm*****@newsgroups.nospamwrote in message
news:0A**********************************@microsof t.com...

I support several intranet sites one of which had NO STATE. Even though
content has ASP extensions, it was all rendered HTML. Site had NO session

or

application variables being managed. Site had no global.asa. IIS Manager
had site timeout set to 20 minutes.

We had to add an ASP include to pages, and that ASP include contained our
first session variable. Users then started complaining of timeouts and

being

redirected to logout pages because session variable evaporated. Users
requested a 4 hour - 240 minute timeout. This was set in IIS Manager on
site, and it didn''t work. We added global.asa with timeout set in session
on_start routine, and even though we could display the timeout variable at
240 minutes, if we wait 30 minutes and pressed refresh on page displayed,

it

took logic path indicating session variable no longer set.

Anyone know why we are experiencing this behavior?


Most likely the application pool is recycling.

Take a look at the properties of the Application pool the site runs in. You
will probably need to adjust the recycling and preformance tabs so that the
workprocess is not recycled on a regular basis during normal use and that
the idle timeout is longer than the session timeout you require.

--
Anthony Jones - MVP ASP/ASP.NET


这篇关于超时值&amp;会话变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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