views:

2321

answers:

3

Can it be done or the only way is to configure it on IIS?

+2  A: 

You edit generally the Global.asax file's Session_Start method and set Session.TimeOut to whatever you want. You can do this anywhere else in your code too.

SoloBold
what happens when it differs with the value set in IIS?
Juan Manuel
I believe you Web.Config/Program/Machine.Config file overrides IIS's default setting. Edit: godammit, you would think MS would put that in the HttpSessionState.TimeOut docs.
SoloBold
Well... now I'm not sure. I guess you can try it out yourself ;) And usually MSDN is so good at keeping track of this sort of thing, so I'm flip-flopping back to my original answer for now...
SoloBold
+1  A: 

you can, but it will not override the IIS settings (by default 20 minutos) if you are in a Shared Hosted environment.

what I do is apply the use of SQL Sessions, it will turn the web application a little more slow, but you have total control of the sessions and if you update something to the application and the Compiler needs to re-compile the resources/classes again, the user will not be logged out.

Sessions will be kept in a special table of the SQL database.

balexandre
Can you point to any documentation? I can't test this :(
SoloBold
I don't want to use SQL Server...
Juan Manuel
I can give you a DiscountASP.NET answer received in 26 09 2006:--Dear Costumer,"... As for the session, our servers use 20 minutes of session timeout, anything beyond that, they will need sql session DiscountASP.NETThe power of ASP.NET for less
balexandre
that is set in machine.config file that is in the server and you can flag it to be not override by web.config for example.
balexandre
received from Brinkster at 24 08 2006 --Hello,I am sorry, the session timeout is set to 20 minutes. This cannot bechanged on our shared hosting servers.Thank you,DouglasTechnical Support RepresentativeBrinkster Communications Corporationwww.Brinkster.com
balexandre
+1  A: 

Have you tried looking at this site http://forums.asp.net/p/1283350/2459047.aspx hth.

KG Sosa