Session Timeout.

S

Sai

Friends,

We have a simple application which has login page, users login to it
and enter their contact details and all other stuff. It is working
fine. Now we have moved to new windows 2003 server. The page works
but it gets refreshed every 5 mintues and goes back to login.aspx page.
How do I fix this.

Thanks for any help.

K
 
B

Bishoy George

Add this in your Web.config file to elongate Session to 60min for example:

<sessionState cookieless="UseCookies" mode="InProc" timeout="60" />

but add it between
<system.web> </system.web>
--


Bishoy George
(e-mail address removed)
20102550399
 
A

Alvin Bruney

Do you have code in your page to redirect to your login page? Sounds like
your session is timing out and your code is kicking in to repost. Write some
code in your session_end event handler to dump a file with a time-stamp to
tell you when the session is dying. You can trouble-shoot from there.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Professional VSTO.NET - Wrox/Wiley 2006
 
S

Sai

Hi Alvin,

thanks for the advise. Iam inputting the values to a text file when
session times out. It is coming as 60 seconds. So the session is
timing out at every 60 seconds, but I could not find where to change
these value. I checked the web.config and machine.config and
application pools .

Let me know specific place to change this value.

thanks,
K
 
A

Alvin Bruney

So you have an override somewhere in your code because the timeout value is
20 minutes by default. Search your code for that value. Alternatively, it
may be overridden in the web.config file. As a quick test, you can set
session.timeout = 10 minutes. It should stick otherwise, you have something
funky going on in your app that you either don't know about or aren't
sharing.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Professional VSTO.NET - Wrox/Wiley 2006
 
S

Sai

Nothing in the code, nothing in the web.config. It has to be some
other place. I have seen all my code and no where I am setting these
values.
I tried changing session timeout to 10 minutes and still nothing
happens. So it got to be some where, not that simple.
Where else it can be.?

Thanks.
K
 
S

Sai

Thanks for all your help. It got fixed just now. The problem is
Virtual memory was so low (250MB), so every time a worker process
initiates it goes to 250 MB and it recycles, so what we did was, we
just removed the check box next to virtual memory of application pool.
that's it. It works...great relief.

Thanks,
K
 
A

Alvin Bruney

you need that check. go back and put it in there so that your application
can be resilient to memory issues. However, raise the limit to around 1gig
or so. The reason for this is that the application pool should be recycled
if an errant application (your code) decides to hog memory. Removing that
check prevents detection of this and other conditions.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Professional VSTO.NET - Wrox/Wiley 2006
 
A

Alvin Bruney

it's under one of the application pool health monitoring tabs in IIS

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Professional VSTO.NET - Wrox/Wiley 2006
 
R

RonL

I couldn't find it. I see you're talking about Windows 2003 and I'm
looking at IIS 5 and XP Pro on my local machine.

Ron
 
A

Alvin Bruney

IIS 5 doesn't have these characteristics. sorry.

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Professional VSTO.NET - Wrox/Wiley 2006
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top