Override Session Timeout

G

Guest

I am deploying to a web environment that uses load balancing and to insure
that sessions persist across servers, the environment uses SQL to manage
sessions. The machine.config file determines how all applications will use
sessions and to insure that all application use this method, the session
properties cannot be overriden.

Within the sessionstate tags, the webadmin (upon my request)r emoved the
property for timeout, hoping that individual applications could override the
default of 20 minutes. I have a web application that I'm trying to deploy to
this environment and no matter what I do, I cannot increase the session
timeout for the application (or a particular page). Due to a large form the
users must fillout, I must have a session that persists longer than 20
minutes. Is there any way to override this. I've tried using several
methods including setting the session.timeout property in the session_start
event in global.aspx.db. I also have tried setting it in the page load event
of the page where I need the session to persist > 20 minutes. In order to
just get the application to work, I've had to comment out the sessionstate
tags altogether in the web.config file (probably because machine.config is
set to not override for sessionstate). Mode is required property of this tag
anyways and that is something I don't want to override. Any help would be
greatly appreciated.
 
G

Guest

Hey,

First of all i am not sure if i understood your problem but here goes anyways

According to you

1) The machine.config always overrides the settigns in web.config
2) You have removed the timeout in machine.config
3) inspite of you changing the session timeout at your side everytime 20
mins it timedout.

well according to my understanding of your problem from above :-

a) The default timeout for session is 20 mins ,hence as far as my
understanding goes even by removing the timeout attribute in machine.config
it will still take the dafult 20 mins timeout.
b) Inspite of you making changes to timeout at your end its taking the 20
mins timeout and as per your point 1) above i guess the attribute has a <
allowOverride=â€false†> which isnt allowing the application config to
override the machine.config. Hence you are not being able to override the
machine.config settings.
Check this link for help :-

http://support.microsoft.com/kb/815174

Let me know what happens
 
G

Guest

In addition to what Shaun wrote... Did you adjust the time out value in the
web.config file?

<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>

Kind regards,
Nikander & Margriet Bruggeman
 
G

Guest

Hi Shaun. I believe you have the problem exactly right. From looking at
the link you provided me, I'm guessing that there is no way for me to
override this setting. Our web admin will not remove the
allowoverride=false from the machine.config file for the machine sessionstate
and for good reason (we have a web farm and we can't risk having applications
deployed that don't use SQL for session state). However, it is extremely
frustrating that I cannot override the timeout property for one page because
the web admin has no problem with me overriding that particular property of
the sessionstate. If I misunderstood the link you sent me, please let me
know. Thank you for your assistance.
 
G

Guest

I cannot put the sessionstate tag, at all, in my web.config file because the
machine.config does not allow overrides for this particular setting (see
Shaun response). The app will not even run if I have anything for
sessionstate. I'm really looking for the ability to override the session
timout property in code for one page. For example, session.timeout=60 on
page load event.
 
G

Guest

Hi bdeviled,
As far as i am aware of, till the time your Admin gets rid of the <
allowOverride=â€false > tag from the machine.config file you wont be able to
override the Session time out.
Will try and find out if thats possible by having some workaround and get
abck to you,but i dont think it might be possible.

The best option is for you to convince your Admin or get the server changed :)

***************************
Shaun, M.C.P (70-315)
http://blogs.wwwcoder.com/shaunakp
***************************
 
G

Guest

Thank you Shaun. I've tried several things to override this and I think
you're correct. Convincing my web admin will be quite a task. I don't think
he'll want to risk having an application deployed that is using mode=inproc,
on our server farm. If you have any alternatives I might suggest to him
regarding that issue, that would be very helpful. Again, thank you for your
assistance.
 
L

lekshmi

I have a similar problem.
In my machine.config file, httpRuntime
executionTimeout="90".
and it dosent have <location> attribute nad
<allowOverride> attribute.
But my thread dies off after 1hr.
In the web.config, i have given httpRuntime
executionTimeout="7200"

Why is this happening?
 

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
473,754
Messages
2,569,526
Members
44,997
Latest member
mileyka

Latest Threads

Top