My session-object dies way to early

  • Thread starter Thread starter Mr m?ll
  • Start date Start date
M

Mr m?ll

Hi
Im quite new to web programming and I'm buildning this ASP .net page.

I use VS 2003 and C# + IIS 5. The page consists of a login page that
leads to a frame page (with some pages, reading from a MSDE-database)

In the projects web.config-file I have
sessionState mode="InProc"
cookieless="true"
timeout="40"

But all I get is a few lousy minutes before my Session-object dies.
What am I doing wrong ?

/Thanks in advance, Möll
 
take a look in
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\machine.config at
sessionState tag and look at attribute timeout to see how many minutes is set
there.

hope helps
Cheers
 
if you are having problem with sql connection then you should change your
connectiontimeout on command and set to this a longer timeout. I think it is
set to 5 min.
 
if this still doesn't work i found that there is another option which can be
set to make your session longer.
In IIS on your web application right click properties
 
Hi,

I guess that you use forms authentication. Do you have a timeout defined for
forms authentication on the web.config? The problem can be as follows; if the
forms authentication cookie expires (assuming you have a nonpersistent
cookie), the session will be lost although it did not expire yet.

Btw, in my tests, I see that when you put a session timeout on the IIS level
and when you also define it on web.config on session state, then the setting
 
Hi,

I guess that you use forms authentication. Do you have a timeout defined for
forms authentication on the web.config? The problem can be as follows; if the
forms authentication cookie expires (assuming you have a nonpersistent
cookie), the session will be lost although it did not expire yet.

Btw, in my tests, I see that when you put a session timeout on the IIS level
and when you also define it on web.config on session state, then the setting
on web.config overwrites the IIS setting.

Hope this helps,

Ethem
 
Thanks guys!

Sorry for not answering your posts earlier haven't been home...
anyway. I tried some of the things you suggested and now I have my
40 mins for the session-object (can't really say what did it though ... )

Best regards, Möll
 

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

Back
Top