会话到期 [英] Session expiration

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

问题描述

您好,


有谁能告诉我如何延长会话时间

到期时间?是通过代码还是通过IIS完成的?对不起我是

new并且不知道这个。

解决方案

在代码中,它是Session.Timeout

http://msdn.microsoft.com/library/de..._sesoptime.asp


Vishal <一个******* @ discussions.microsoft.com>在消息中写道

news:14 **************************** @ phx.gbl ... < blockquote class =post_quotes>你好,

任何人都可以告诉我如何延长会话的到期时间?是通过代码还是通过IIS完成的?对不起,我是新的,不知道这个。




你建议把它设置在哪里?

我在web.config文件中听说过:

< sessionState mode =" InProc" timeout =" 60">

但我似乎无法让它工作?

global.asax文件怎么样?

我以为逐页被杀了?


thanx。


" Ken Cox [Microsoft MVP]"写道:

在代码中,它是Session.Timeout

http://msdn.microsoft.com/library/de..._sesoptime.asp

维沙尔 <一个******* @ discussions.microsoft.com>在消息中写道
新闻:14 **************************** @ phx.gbl ...

您好,

任何人都可以告诉我如何延长会话到期时间?是通过代码还是通过IIS完成的?对不起,我是新的,不知道这个。




默认值是好身材:20分钟。


如果你不打算让你的用户留在任何一个

页面而不浏览其他页面

长,你可以把它设置为15或甚至10分钟。


将它设置为更高的数字只会浪费资源

如果你的用户永远不会在一个页面停留很长时间

你在Session.Timeout中设置。


请记住,Session_OnEnd仅在

Session.Timeout中指定的分钟数

已经过*没有*用户请求了一页。



Juan T. Llibre

ASP.NET MVP

===========

" Chris" <章*** @ discussions.microsoft.com>在留言中写道

新闻:9B ********************************** @ microsof t.com ...

你建议把它设置在哪里?
我在web.config文件中听说过:
< sessionState mode ="是InProc" timeout =" 60">
但是我似乎无法让它工作?
global.asax文件怎么样?
我认为页面逐页被杀?

感谢。

  Ken Cox [微软MVP]"写道:

在代码中,它是Session.Timeout

http://msdn.microsoft.com/library/de..._sesoptime.asp

维沙尔 <一个******* @ discussions.microsoft.com>在消息中写道
新闻:14 **************************** @ phx.gbl ...

>你好,
>
>任何人都可以告诉我如何延长会议时间
>到期时间?是通过代码还是通过IIS完成的?对不起我是
>新的,不知道这个。
>
>




---

外发邮件已通过无病毒验证。

由AVG反病毒系统检查( http://www.grisoft.com)

版本:6.0.794 /病毒库:538 - 发布日期:10/11/2004


Hello,

can anybody tell me how I can extend the session
expiry time? Is it done via code or via IIS? Sorry I am
new and dont know about this.

解决方案

In code, it is Session.Timeout

http://msdn.microsoft.com/library/de..._sesoptime.asp

"Vishal" <an*******@discussions.microsoft.com> wrote in message
news:14****************************@phx.gbl...

Hello,

can anybody tell me how I can extend the session
expiry time? Is it done via code or via IIS? Sorry I am
new and dont know about this.




where do you suggest to set this at?
I''ve heard in the web.config file:
<sessionState mode="InProc" timeout="60">
but I can''t seem to get that to work?
What about the global.asax file?
I thought that page by page is over kill?

thanx.

"Ken Cox [Microsoft MVP]" wrote:

In code, it is Session.Timeout

http://msdn.microsoft.com/library/de..._sesoptime.asp

"Vishal" <an*******@discussions.microsoft.com> wrote in message
news:14****************************@phx.gbl...

Hello,

can anybody tell me how I can extend the session
expiry time? Is it done via code or via IIS? Sorry I am
new and dont know about this.




The default value is a good figure : 20 minutes.

If you don''t plan for your users to stay at any one
page without browsing to other pages for that
long, you could set it at 15 or even 10 minutes.

Setting it to a higher figure will only waste resources
if your users never stay at one page for as long a time
as you set in Session.Timeout.

Remember, Session_OnEnd only executes after
the number of minutes specified in Session.Timeout
has elapsed *without* the user having requested a page.


Juan T. Llibre
ASP.NET MVP
===========
"Chris" <Ch***@discussions.microsoft.com> wrote in message
news:9B**********************************@microsof t.com...

where do you suggest to set this at?
I''ve heard in the web.config file:
<sessionState mode="InProc" timeout="60">
but I can''t seem to get that to work?
What about the global.asax file?
I thought that page by page is over kill?

thanx.

"Ken Cox [Microsoft MVP]" wrote:

In code, it is Session.Timeout

http://msdn.microsoft.com/library/de..._sesoptime.asp

"Vishal" <an*******@discussions.microsoft.com> wrote in message
news:14****************************@phx.gbl...

> Hello,
>
> can anybody tell me how I can extend the session
> expiry time? Is it done via code or via IIS? Sorry I am
> new and dont know about this.
>
>



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.794 / Virus Database: 538 - Release Date: 10/11/2004


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

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