![]() |
|
|
|||||||
![]() |
ASP Net - My session-object dies way to early |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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 Mr m?ll |
|
|
|
|
#2 |
|
Posts: n/a
|
take a look in
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFI G\machine.config at sessionState tag and look at attribute timeout to see how many minutes is set there. hope helps Cheers "Mr m?ll" wrote: > 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 > |
|
|
|
#3 |
|
Posts: n/a
|
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. "Mr m?ll" wrote: > 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 > |
|
|
|
#4 |
|
Posts: n/a
|
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 on virtual directory tab click configuration button here on option tab set your session timeout. "Mr m?ll" wrote: > 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 > |
|
|
|
#5 |
|
Posts: n/a
|
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. "Mr m?ll" wrote: > 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 > |
|
|
|
#6 |
|
Posts: n/a
|
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 "Mr m?ll" wrote: > 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 > |
|
|
|
#7 |
|
Posts: n/a
|
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 |
|