473,468 Members | 1,449 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Timeout period not seeming to work correctly

I have the following in my web.config in my application root.

<forms name="staffing"
loginUrl="/applicant/EELogin.aspx"
timeout="400"
protection="All"
path="/" />

I assumed this meant the session would be valid for 400 minutes. Is this
correct?

I seem to find my session cookies gone after about 20-30 minutes, however.

Do I have to do something else to make this timeout longer?

Also, when is the timeout refreshed?

On each new page or on each postback?

What about refreshing a page?

Thanks,

Tom
Nov 19 '05 #1
9 1885
It's possible that the worker process is restarting, thus losing your in
memory Session STate. I'd suggest looking into configuring the NTState service.
This will show you how to set that up:

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

-Brock
DevelopMentor
http://staff.develop.com/ballen
I have the following in my web.config in my application root.

<forms name="staffing"
loginUrl="/applicant/EELogin.aspx"
timeout="400"
protection="All"
path="/" />
I assumed this meant the session would be valid for 400 minutes. Is
this correct?

I seem to find my session cookies gone after about 20-30 minutes,
however.

Do I have to do something else to make this timeout longer?

Also, when is the timeout refreshed?

On each new page or on each postback?

What about refreshing a page?

Thanks,

Tom


Nov 19 '05 #2
tshad wrote:
I have the following in my web.config in my application root.

<forms name="staffing"
loginUrl="/applicant/EELogin.aspx"
timeout="400"
protection="All"
path="/" />

I assumed this meant the session would be valid for 400 minutes. Is
this correct?

I seem to find my session cookies gone after about 20-30 minutes,
however.
Do I have to do something else to make this timeout longer?

Also, when is the timeout refreshed?

On each new page or on each postback?

What about refreshing a page?

Thanks,

Tom


If I'm not mistaken, the login-timeout is *different* from the session timeout.
So the login might be valid for 400 minutes (no experience with that, so I don't
know for sure), but the session still times out after 20 minutes.

See web.config, <sessionState ... timeout="20" /> for the session timeout.

Hans Kesting
Nov 19 '05 #3
"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:OR**************@TK2MSFTNGP09.phx.gbl...
tshad wrote:
I have the following in my web.config in my application root.

<forms name="staffing"
loginUrl="/applicant/EELogin.aspx"
timeout="400"
protection="All"
path="/" />

I assumed this meant the session would be valid for 400 minutes. Is
this correct?

I seem to find my session cookies gone after about 20-30 minutes,
however.
Do I have to do something else to make this timeout longer?

Also, when is the timeout refreshed?

On each new page or on each postback?

What about refreshing a page?

Thanks,

Tom
If I'm not mistaken, the login-timeout is *different* from the session
timeout.
So the login might be valid for 400 minutes (no experience with that, so I
don't
know for sure), but the session still times out after 20 minutes.

See web.config, <sessionState ... timeout="20" /> for the session timeout.


Makes sense, but when I tried it, it broke my web.config file.

I added in:

<sessionstate
mode="inproc"
cookieless="false"
timeout="400"
/>

Now I get the error:

************************************************** *************************************
Runtime Error
Description: An application error occurred on the server. The current custom
error settings for this application prevent the details of the application
error from being viewed remotely (for security reasons). It could, however,
be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable
on remote machines, please create a <customErrors> tag within a "web.config"
configuration file located in the root directory of the current web
application. This <customErrors> tag should then have its "mode" attribute
set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>

************************************************** ****************************************

But I have the customErrors tag in my web.config and it works fine until I
add the SessionState section.

Top part of my web.config
************************************************** **********************
<configuration>
<system.web>
<customErrors mode="Off"/>
<authentication mode="Forms">
<forms name="staffing"
loginUrl="/applicant/EELogin.aspx"
timeout="400"
protection="All"
path="/" />
</authentication>
************************************************** ***********************

Tom
Hans Kesting

Nov 19 '05 #4
You are probably getting the error because the web.config is
casesensitive. That means that you should not enter sessionstate, but
use sessionState instead.

Hope this helps,

Ronald Lemmen

Nov 19 '05 #5
"Ronald Lemmen" <mu*****@hotmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
You are probably getting the error because the web.config is
casesensitive. That means that you should not enter sessionstate, but
use sessionState instead.

That was it.

I also had to use "InProc" instead of "inproc".

I never could figure out what the problem was and was going to come back to
it later.

Thanks,

Tom
Hope this helps,

Ronald Lemmen

Nov 19 '05 #6
I am still having the problem even with the fixes below.

The first part of my web.config is:

<configuration>
<system.web>
<customErrors mode="Off"/>
<sessionState
mode="InProc"
cookieless="false"
timeout="400"
/>
<authentication mode="Forms">
<forms name="staffing"
loginUrl="/applicant/EELogin.aspx"
timeout="400"
protection="All"
path="/" />
</authentication>

I have both forms and sessionState to timeout at 400 minutes.

The problem is that after about 20-30 minutes of just going back and forth
using the same page (as I am testing the page), all of a sudden all my
session variables are gone. They shouldn't be gone for hours.

What else am I missing?

I need to figure this out as we are going to be showing this to some people
and I don't want the page timing in 20 minutes.

Thanks,

Tom

"tshad" <ts**********@ftsolutions.com> wrote in message
news:eI**************@TK2MSFTNGP14.phx.gbl...
"Ronald Lemmen" <mu*****@hotmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
You are probably getting the error because the web.config is
casesensitive. That means that you should not enter sessionstate, but
use sessionState instead.


That was it.

I also had to use "InProc" instead of "inproc".

I never could figure out what the problem was and was going to come back
to it later.

Thanks,

Tom
Hope this helps,

Ronald Lemmen


Nov 19 '05 #7
You might want to take a look at the setting
for recycling the ASP.NET worker process.

When you use InProc session state management,
and the worker process recycles, your application
restarts, causing the loss of all your session variables,
if you're using InProc state management.

Open the IIS MMC, and scroll down to Application Pools.
Check the recycling settings for short recycle periods and adjust if necessary.

You might also want to consider using State Server or SQL Server
State management, instead of InProc, since they persist Session
settings when the ASP.NET worker processes are recycled.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:OV**************@tk2msftngp13.phx.gbl...
I am still having the problem even with the fixes below.

The first part of my web.config is:

<configuration>
<system.web>
<customErrors mode="Off"/>
<sessionState
mode="InProc"
cookieless="false"
timeout="400"
/>
<authentication mode="Forms">
<forms name="staffing"
loginUrl="/applicant/EELogin.aspx"
timeout="400"
protection="All"
path="/" />
</authentication>

I have both forms and sessionState to timeout at 400 minutes.

The problem is that after about 20-30 minutes of just going back and forth using the
same page (as I am testing the page), all of a sudden all my session variables are gone.
They shouldn't be gone for hours.

What else am I missing?

I need to figure this out as we are going to be showing this to some people and I don't
want the page timing in 20 minutes.

Thanks,

Tom

"tshad" <ts**********@ftsolutions.com> wrote in message
news:eI**************@TK2MSFTNGP14.phx.gbl...
"Ronald Lemmen" <mu*****@hotmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
You are probably getting the error because the web.config is
casesensitive. That means that you should not enter sessionstate, but
use sessionState instead.


That was it.

I also had to use "InProc" instead of "inproc".

I never could figure out what the problem was and was going to come back to it later.

Thanks,

Tom
Hope this helps,

Ronald Lemmen



Nov 19 '05 #8
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
You might want to take a look at the setting
for recycling the ASP.NET worker process.

When you use InProc session state management,
and the worker process recycles, your application
restarts, causing the loss of all your session variables,
if you're using InProc state management.

Open the IIS MMC, and scroll down to Application Pools.
Check the recycling settings for short recycle periods and adjust if
necessary.
I assume you are talking about the Idle timeout (as that was set for 20
minutes).

What is the drawback of having it for an hour? Does it slow things down or
leave the session variables around for longer than necessary?
You might also want to consider using State Server or SQL Server
State management, instead of InProc, since they persist Session
settings when the ASP.NET worker processes are recycled.

I need to check out the pluses and minuses of these to decide which is best
for us.

I assume that InProc is default?

Thanks,

Tom


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:OV**************@tk2msftngp13.phx.gbl...
I am still having the problem even with the fixes below.

The first part of my web.config is:

<configuration>
<system.web>
<customErrors mode="Off"/>
<sessionState
mode="InProc"
cookieless="false"
timeout="400"
/>
<authentication mode="Forms">
<forms name="staffing"
loginUrl="/applicant/EELogin.aspx"
timeout="400"
protection="All"
path="/" />
</authentication>

I have both forms and sessionState to timeout at 400 minutes.

The problem is that after about 20-30 minutes of just going back and
forth using the same page (as I am testing the page), all of a sudden all
my session variables are gone. They shouldn't be gone for hours.

What else am I missing?

I need to figure this out as we are going to be showing this to some
people and I don't want the page timing in 20 minutes.

Thanks,

Tom

"tshad" <ts**********@ftsolutions.com> wrote in message
news:eI**************@TK2MSFTNGP14.phx.gbl...
"Ronald Lemmen" <mu*****@hotmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
You are probably getting the error because the web.config is
casesensitive. That means that you should not enter sessionstate, but
use sessionState instead.
That was it.

I also had to use "InProc" instead of "inproc".

I never could figure out what the problem was and was going to come back
to it later.

Thanks,

Tom

Hope this helps,

Ronald Lemmen



Nov 19 '05 #9

"tshad" <ts**********@ftsolutions.com> wrote in message
news:uD**************@TK2MSFTNGP09.phx.gbl...
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
You might want to take a look at the setting
for recycling the ASP.NET worker process.

When you use InProc session state management,
and the worker process recycles, your application
restarts, causing the loss of all your session variables,
if you're using InProc state management.

Open the IIS MMC, and scroll down to Application Pools.
Check the recycling settings for short recycle periods and adjust if
necessary.
I assume you are talking about the Idle timeout (as that was set for 20
minutes).

What is the drawback of having it for an hour? Does it slow things down
or leave the session variables around for longer than necessary?

You might also want to consider using State Server or SQL Server
State management, instead of InProc, since they persist Session
settings when the ASP.NET worker processes are recycled.

When the worker process recycles, you say you lose your Session variables,
do you also lose your ASP.NET_SessionId ? I found that if reset the web
server, I would lose my session variables, but not my ASP.NET_SessionId.

Also, does the Session_End event fire when the worker process recycles?

I know it does when you abandon it.

Thanks,

Tom

I need to check out the pluses and minuses of these to decide which is
best for us.

I assume that InProc is default?

Thanks,

Tom


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"tshad" <ts**********@ftsolutions.com> wrote in message
news:OV**************@tk2msftngp13.phx.gbl...
I am still having the problem even with the fixes below.

The first part of my web.config is:

<configuration>
<system.web>
<customErrors mode="Off"/>
<sessionState
mode="InProc"
cookieless="false"
timeout="400"
/>
<authentication mode="Forms">
<forms name="staffing"
loginUrl="/applicant/EELogin.aspx"
timeout="400"
protection="All"
path="/" />
</authentication>

I have both forms and sessionState to timeout at 400 minutes.

The problem is that after about 20-30 minutes of just going back and
forth using the same page (as I am testing the page), all of a sudden
all my session variables are gone. They shouldn't be gone for hours.

What else am I missing?

I need to figure this out as we are going to be showing this to some
people and I don't want the page timing in 20 minutes.

Thanks,

Tom

"tshad" <ts**********@ftsolutions.com> wrote in message
news:eI**************@TK2MSFTNGP14.phx.gbl...
"Ronald Lemmen" <mu*****@hotmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
> You are probably getting the error because the web.config is
> casesensitive. That means that you should not enter sessionstate, but
> use sessionState instead.
>

That was it.

I also had to use "InProc" instead of "inproc".

I never could figure out what the problem was and was going to come
back to it later.

Thanks,

Tom

> Hope this helps,
>
> Ronald Lemmen
>



Nov 19 '05 #10

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

Similar topics

7
by: C# beginner | last post by:
I'm struggling with a timeout problem today. ConnectionString = "Integrated Security=true;Database=MyDatabase;Data Source=(local); Connection Timeout = 180;"; My connection string is set as...
3
by: J | last post by:
How can I prevent the error of... Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Description: An unhandled exception occurred...
1
by: tfs | last post by:
I have a web program that is using formauthentication. My web.config file is <configuration> <appSettings> <add key="MM_CONNECTION_HANDLER_ServerDino" value="sqlserver.htm" /> <add...
2
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET ...
15
by: dee | last post by:
Hi, What is the maximum number of minutes for Session timeout that I can specify in web.config? Thanks. Dee
4
by: VB Programmer | last post by:
When I run my ASP.NET 2.0 web app on my dev machine it works perfect. When I precomile it to my web deployment project and then copy the debug files to my web server I get this problem when trying...
1
by: Siegfried Heintze | last post by:
I have a page with a huge session state but extremely low traffic. The default timeout period that is normally sufficient is not. I thougth I was changing the timeout period with the following...
25
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
13
by: =?Utf-8?B?ZG91Zw==?= | last post by:
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
1
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...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.