473,545 Members | 937 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cannot set timeout with asp.net 1.1 over than 20 minutes

Hallo to the group,

my question is this: where i have to set timeout in a web application?
If i set into sessionState with property Timeout="60", after 20
minutes the session is over. Always after 20 minutes, i cannot set a
timeout greater than 20 minutes.

Our configuration is the following:
- Server with Win2003, i.e. IIS 6.0
- Web application developed with vb.net simply composed by:
- login.aspx (only one button that make setAuthCookie)
- home.aspx: label showing the time of the last postback and a
button to make a postback.
- session_timeout .aspx: just to show that the session is over
- a class from which our pages are inherited; that class permit to
check when a new session is started and redirect to
session_timeout .aspx. The only method in our class is:
Protected Overrides Sub OnInit(ByVal e As EventArgs)
MyBase.OnInit(e )
If Session.IsNewSe ssion Then
Dim cookie_header As String = Request.Headers ("Cookie")
If Not cookie_header Is Nothing AndAlso
cookie_header.I ndexOf("ASP.NET _SessionId") >= 0 Then
Response.Redire ct("session_tim eout.aspx")
End If
End If
end sub
- web.config with:
<authenticati on mode="Forms">
<forms loginUrl="login .aspx" name=".TESTCOOK IE" timeout="480"/>
</authentication>
.....
<authorizatio n>
<deny users="?" />
</authorization>
.....
<sessionState mode="InProc" cookieless="fal se" timeout="60" />

Setting home.aspx to be the start page, i get first the login.aspx
and, after a click on the "stupid login button", i get the home.aspx.
I try to click to the "postback" button after 20 minutes, and the
application show me the session_timeout .aspx

Please help me...
Thanks in advance

Apr 18 '07 #1
5 3766
check the idleTimeout setting. inproc sessions are lost when asp.net
recycles.

-- bruce (sqlwork.com)

Masso wrote:
Hallo to the group,

my question is this: where i have to set timeout in a web application?
If i set into sessionState with property Timeout="60", after 20
minutes the session is over. Always after 20 minutes, i cannot set a
timeout greater than 20 minutes.

Our configuration is the following:
- Server with Win2003, i.e. IIS 6.0
- Web application developed with vb.net simply composed by:
- login.aspx (only one button that make setAuthCookie)
- home.aspx: label showing the time of the last postback and a
button to make a postback.
- session_timeout .aspx: just to show that the session is over
- a class from which our pages are inherited; that class permit to
check when a new session is started and redirect to
session_timeout .aspx. The only method in our class is:
Protected Overrides Sub OnInit(ByVal e As EventArgs)
MyBase.OnInit(e )
If Session.IsNewSe ssion Then
Dim cookie_header As String = Request.Headers ("Cookie")
If Not cookie_header Is Nothing AndAlso
cookie_header.I ndexOf("ASP.NET _SessionId") >= 0 Then
Response.Redire ct("session_tim eout.aspx")
End If
End If
end sub
- web.config with:
<authenticati on mode="Forms">
<forms loginUrl="login .aspx" name=".TESTCOOK IE" timeout="480"/>
</authentication>
.....
<authorizatio n>
<deny users="?" />
</authorization>
.....
<sessionState mode="InProc" cookieless="fal se" timeout="60" />

Setting home.aspx to be the start page, i get first the login.aspx
and, after a click on the "stupid login button", i get the home.aspx.
I try to click to the "postback" button after 20 minutes, and the
application show me the session_timeout .aspx

Please help me...
Thanks in advance
Apr 18 '07 #2
On 18 Apr, 17:18, bruce barker <nos...@nospam. comwrote:
check the idleTimeout setting. inproc sessions are lost when asp.net
recycles.
Thank you. Unfortunately idleTimeout is already set to infinite, which
is the default. Next guess? :)

Maurizio

Apr 23 '07 #3
re:
!I cannot set a timeout greater than 20 minutes.

Session timeout and forms authentication timeout are two different things.

A session will last for as long a period as you set in <sessionstate.. .>

A period of time for your app to remember your login parameters is different.
That's set in the forms timeout property.

ASP.NET membership doesn't need for a session to be active
in order to remember whether your membership parameters are active.

One of those parameters is the time for the app
to remember whether you're logged in or not.

You can choose to base your app on the length of the session,
or on the time needed for your login to expire.

If you're using forms authentication, modify the forms authentication timeout :

<forms name=".ASPXAUTH " loginUrl="login .aspx" protection="All " timeout="30" path="/"
requireSSL="fal se" slidingExpirati on="true">


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Masso" <ma************ @gmail.comwrote in message
news:11******** *************@e 65g2000hsc.goog legroups.com...
Hallo to the group,

my question is this: where i have to set timeout in a web application?
If i set into sessionState with property Timeout="60", after 20
minutes the session is over. Always after 20 minutes, i cannot set a
timeout greater than 20 minutes.

Our configuration is the following:
- Server with Win2003, i.e. IIS 6.0
- Web application developed with vb.net simply composed by:
- login.aspx (only one button that make setAuthCookie)
- home.aspx: label showing the time of the last postback and a
button to make a postback.
- session_timeout .aspx: just to show that the session is over
- a class from which our pages are inherited; that class permit to
check when a new session is started and redirect to
session_timeout .aspx. The only method in our class is:
Protected Overrides Sub OnInit(ByVal e As EventArgs)
MyBase.OnInit(e )
If Session.IsNewSe ssion Then
Dim cookie_header As String = Request.Headers ("Cookie")
If Not cookie_header Is Nothing AndAlso
cookie_header.I ndexOf("ASP.NET _SessionId") >= 0 Then
Response.Redire ct("session_tim eout.aspx")
End If
End If
end sub
- web.config with:
<authenticati on mode="Forms">
<forms loginUrl="login .aspx" name=".TESTCOOK IE" timeout="480"/>
</authentication>
.....
<authorizatio n>
<deny users="?" />
</authorization>
.....
<sessionState mode="InProc" cookieless="fal se" timeout="60" />

Setting home.aspx to be the start page, i get first the login.aspx
and, after a click on the "stupid login button", i get the home.aspx.
I try to click to the "postback" button after 20 minutes, and the
application show me the session_timeout .aspx

Please help me...
Thanks in advance


Apr 23 '07 #4
Adding to this reply:

You're using :
<forms loginUrl="login .aspx" name=".TESTCOOK IE" timeout="480"/>
</authentication>

You should add slidingExpirati on="true" :

<forms loginUrl="login .aspx" name=".TESTCOOK IE" timeout="30" slidingExpirati on="true"/>
</authentication>

btw, are you sure you want to set the expiration to 8 *hours* ?

There's lots of background info on forms authentication parameters at :

http://support.microsoft.com/kb/910443

....and here's a link which shows you how to troubleshoot forms authentication:

http://support.microsoft.com/kb/910439/

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
re:
!I cannot set a timeout greater than 20 minutes.

Session timeout and forms authentication timeout are two different things.

A session will last for as long a period as you set in <sessionstate.. .>

A period of time for your app to remember your login parameters is different.
That's set in the forms timeout property.

ASP.NET membership doesn't need for a session to be active
in order to remember whether your membership parameters are active.

One of those parameters is the time for the app
to remember whether you're logged in or not.

You can choose to base your app on the length of the session,
or on the time needed for your login to expire.

If you're using forms authentication, modify the forms authentication timeout :

<forms name=".ASPXAUTH " loginUrl="login .aspx" protection="All " timeout="30" path="/"
requireSSL="fal se" slidingExpirati on="true">


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Masso" <ma************ @gmail.comwrote in message
news:11******** *************@e 65g2000hsc.goog legroups.com...
>Hallo to the group,

my question is this: where i have to set timeout in a web application?
If i set into sessionState with property Timeout="60", after 20
minutes the session is over. Always after 20 minutes, i cannot set a
timeout greater than 20 minutes.

Our configuration is the following:
- Server with Win2003, i.e. IIS 6.0
- Web application developed with vb.net simply composed by:
- login.aspx (only one button that make setAuthCookie)
- home.aspx: label showing the time of the last postback and a
button to make a postback.
- session_timeout .aspx: just to show that the session is over
- a class from which our pages are inherited; that class permit to
check when a new session is started and redirect to
session_timeou t.aspx. The only method in our class is:
Protected Overrides Sub OnInit(ByVal e As EventArgs)
MyBase.OnInit(e )
If Session.IsNewSe ssion Then
Dim cookie_header As String = Request.Headers ("Cookie")
If Not cookie_header Is Nothing AndAlso
cookie_header. IndexOf("ASP.NE T_SessionId") >= 0 Then
Response.Redire ct("session_tim eout.aspx")
End If
End If
end sub
- web.config with:
<authenticati on mode="Forms">
<forms loginUrl="login .aspx" name=".TESTCOOK IE" timeout="480"/>
</authentication>
.....
<authorizatio n>
<deny users="?" />
</authorization>
.....
<sessionState mode="InProc" cookieless="fal se" timeout="60" />

Setting home.aspx to be the start page, i get first the login.aspx
and, after a click on the "stupid login button", i get the home.aspx.
I try to click to the "postback" button after 20 minutes, and the
application show me the session_timeout .aspx

Please help me...
Thanks in advance



Apr 23 '07 #5
We discovered that using situation: by using

System.Web.Secu rity.FormsAuthe ntication.SetAu thCookie("testu ser",
False)
the system create an AuthCookie with 20 minutes for timeout.

Using the following:
Dim userData As String = "ApplicationSpe cific data for this
user."
Dim ticket As New FormsAuthentica tionTicket(emai l,
isPersistent, 70)
' Encrypt the ticket.
Dim encTicket As String =
FormsAuthentica tion.Encrypt(ti cket)
' Create the cookie.
Response.Cookie s.Add(New
HttpCookie(Form sAuthentication .FormsCookieNam e, encTicket))
we are able to set the timeout. It works great!!!
Deploying the application on another server and testing with http://localhost/...
we have timeout again when postback after 20 minutes.
The difference between the develop and the test environement are the
following:
- Develop: WinXp pro SP2 Test: Win2003 Server
- Develop: IIS 5.1 Test: IIS 6.0
- Both framework: 1.1.4322

Any other ideas?

On 23 Apr, 15:19, "Juan T. Llibre" <nomailrepl...@ nowhere.comwrot e:
Adding to this reply:

You're using :
<forms loginUrl="login .aspx" name=".TESTCOOK IE" timeout="480"/>
</authentication>

You should add slidingExpirati on="true" :

<forms loginUrl="login .aspx" name=".TESTCOOK IE" timeout="30" slidingExpirati on="true"/>
</authentication>

btw, are you sure you want to set the expiration to 8 *hours* ?

There's lots of background info on forms authentication parameters at :

http://support.microsoft.com/kb/910443

...and here's a link which shows you how to troubleshoot forms authentication:

http://support.microsoft.com/kb/910439/

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
=============== =============== =====
"Juan T. Llibre" <nomailrepl...@ nowhere.comwrot e in messagenews:%2* *************** @TK2MSFTNGP06.p hx.gbl...
re:
!I cannot set a timeout greater than 20 minutes.
Session timeout and forms authentication timeout are two different things.
A session will last for as long a period as you set in <sessionstate.. .>
A period of time for your app to remember your login parameters is different.
That's set in the forms timeout property.
ASP.NET membership doesn't need for a session to be active
in order to remember whether your membership parameters are active.
One of those parameters is the time for the app
to remember whether you're logged in or not.
You can choose to base your app on the length of the session,
or on the time needed for your login to expire.
If you're using forms authentication, modify the forms authentication timeout :
<forms name=".ASPXAUTH " loginUrl="login .aspx" protection="All " timeout="30" path="/"
requireSSL="fal se" slidingExpirati on="true">
Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
=============== =============== =====
"Masso" <massimo.pol... @gmail.comwrote in message
news:11******** *************@e 65g2000hsc.goog legroups.com...
Hallo to the group,
my question is this: where i have to set timeout in a web application?
If i set into sessionState with property Timeout="60", after 20
minutes the session is over. Always after 20 minutes, i cannot set a
timeout greater than 20 minutes.
Our configuration is the following:
- Server with Win2003, i.e. IIS 6.0
- Web application developed with vb.net simply composed by:
- login.aspx (only one button that make setAuthCookie)
- home.aspx: label showing the time of the last postback and a
button to make a postback.
- session_timeout .aspx: just to show that the session is over
- a class from which our pages are inherited; that class permit to
check when a new session is started and redirect to
session_timeout .aspx. The only method in our class is:
Protected Overrides Sub OnInit(ByVal e As EventArgs)
MyBase.OnInit(e )
If Session.IsNewSe ssion Then
Dim cookie_header As String = Request.Headers ("Cookie")
If Not cookie_header Is Nothing AndAlso
cookie_header.I ndexOf("ASP.NET _SessionId") >= 0 Then
Response.Redire ct("session_tim eout.aspx")
End If
End If
end sub
- web.config with:
<authenticati on mode="Forms">
<forms loginUrl="login .aspx" name=".TESTCOOK IE" timeout="480"/>
</authentication>
.....
<authorizatio n>
<deny users="?" />
</authorization>
.....
<sessionState mode="InProc" cookieless="fal se" timeout="60" />
Setting home.aspx to be the start page, i get first the login.aspx
and, after a click on the "stupid login button", i get the home.aspx.
I try to click to the "postback" button after 20 minutes, and the
application show me the session_timeout .aspx
Please help me...
Thanks in advance

May 4 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2600
by: E Sullivan | last post by:
I am having a time out issue when multiple users are accessing the server. This time out does not happen all of the time. My understanding is that the time out value is actually set in two places. I believe one is in the asp pages for the session itself, and the other is more of a system timeout settting in IIS. Would one of these supercede...
24
2713
by: jrefactors | last post by:
I have an upload file operation in the web application. UploadForm.jsp is the form, and UploadAction.jsp is the form processing. The web server is Websphere. //UploadForm.jsp <FORM NAME="InputForm" ACTION="UploadAction.jsp" METHOD="POST" enctype=multipart/form-data> <input type="file" name="fileName"> //etc ...
8
5455
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I...
4
2716
by: Siang Hwee | last post by:
Hi. I am facing some problem in Asp.net. I am developing a payroll application currently. This is a web-based application. User need to click on "Process" button in order to process the payroll every time. Now the problem is, if the processing time is less than 3600 seconds, everything will work fine. but when the processing time is more than...
17
5182
by: jensen bredal | last post by:
Hello, i'm struggling with a somehow badly understood session scenario. I provide acces to my pages based on form authentication using Session cookies. Som of my pages are supposed to be running continuously and refreshing once an hour. I there set timeout= 61 in <sessionState section and on my page it says <meta http-equiv="refresh"...
4
9416
by: UJ | last post by:
I have a page where the user can upload a video file. As you can guess, this may take a while. Is there a way I can change the session timeout for just this one page? I would also want to change the forms authentication to be a large value for that page also. TIA - Jeff.
25
6041
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
I tried: <sessionState timeout="1"> </sessionState> bounced IIS, and after 1 minute still had a session. ??? -- thanks - dave
10
2649
by: Atul Shukla | last post by:
Hi, How can I avoid application timeout? Generally a web application time out is 20 minutes, however, we can define this timeout in web.config to any number of minutes. After giving 500 minutes of time out which is about little more than 8 hours, the page expires in less than 2 hours. I am confused here how to avoid this timeout problem. I...
0
1223
by: sbhandary | last post by:
Hi, I have an ASP.net page that takes over an hour and sometimes more to execute. After the page has been running for 60 minutes, I get a Page Cannot Be Displayed error. I have set the session timeout to 40 minutes and have the following java script to send mesg to server just to prevent timeout from occuring. <script...
0
7467
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7656
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7419
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7756
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5326
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3450
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3442
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1879
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
703
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.