473,378 Members | 1,457 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to control session timeout in WebConfig?

Hi -

I'm trying to control the error that is thrown when the session times out.
My code is as follows:

<customErrors
mode="RemoteOnly">
<error
redirect="includes/reload.aspx?iOP=1"
statusCode="Timeout" />
</customErrors>

Any ideas why this isn't working?

Thanks,
Nov 19 '05 #1
3 7722
The method you use is for redirecting HTTP statuscodes like 404 not found
or 500 internal error.
There isn't such a thing as a Timeout status code. Check out http://msdn.microsoft.com/library/de...orssection.asp
Cracefully detecting a session timout can be done by placing some code at
the start of each page. Check out this discussion if it meets your needs :

http://groups-beta.google.com/group/...32a6604c9605fb

Let me know it helped you or not..

Cheers,
Tom Pester
Hi -

I'm trying to control the error that is thrown when the session times
out. My code is as follows:

<customErrors
mode="RemoteOnly">
<error
redirect="includes/reload.aspx?iOP=1"
statusCode="Timeout" />
</customErrors>
Any ideas why this isn't working?

Thanks,

Nov 19 '05 #2
Thanks Tom,

This helps some, and i was not clear in my previous example in using just
the work "Timeout". What i'm trying to find is the IIS generated StatusCode
for Session State timeout? I cannot seem to find this number anywhere, and i
don't want to use the general 500 statuscode error.

Thanks,

"To********************@pandora.be" wrote:
The method you use is for redirecting HTTP statuscodes like 404 not found
or 500 internal error.
There isn't such a thing as a Timeout status code. Check out http://msdn.microsoft.com/library/de...orssection.asp
Cracefully detecting a session timout can be done by placing some code at
the start of each page. Check out this discussion if it meets your needs :

http://groups-beta.google.com/group/...32a6604c9605fb

Let me know it helped you or not..

Cheers,
Tom Pester
Hi -

I'm trying to control the error that is thrown when the session times
out. My code is as follows:

<customErrors
mode="RemoteOnly">
<error
redirect="includes/reload.aspx?iOP=1"
statusCode="Timeout" />
</customErrors>
Any ideas why this isn't working?

Thanks,


Nov 19 '05 #3
Hi Charlie,

HTTP statuscodes are very general and you can't trap a session time out with
it. Take a look here :
http://www.seoconsultants.com/tools/headers.asp
http://www.helpwithpcs.com/courses/h...atus_codes.htm

Let me know if you have any more questions...

Cheers,
Tom Pester
Thanks Tom,

This helps some, and i was not clear in my previous example in using
just the work "Timeout". What i'm trying to find is the IIS generated
StatusCode for Session State timeout? I cannot seem to find this
number anywhere, and i don't want to use the general 500 statuscode
error.

Thanks,

"To********************@pandora.be" wrote:
The method you use is for redirecting HTTP statuscodes like 404 not
found

or 500 internal error.

There isn't such a thing as a Timeout status code. Check out
http://msdn.microsoft.com/library/de...ary/en-us/cpge
nref/html/gngrfcustomerrorssection.asp

Cracefully detecting a session timout can be done by placing some
code at the start of each page. Check out this discussion if it meets
your needs :

http://groups-beta.google.com/group/...tnet.framework
.aspnet/browse_frm/thread/5395f03fbd3b18ff/5232a6604c9605fb?lnk=st&q=
Forms+authentication+and+session+expiration&rnum=1 &hl=en#5232a6604c96
05fb

Let me know it helped you or not..

Cheers,
Tom Pester
Hi -

I'm trying to control the error that is thrown when the session
times out. My code is as follows:

<customErrors
mode="RemoteOnly">
<error
redirect="includes/reload.aspx?iOP=1"
statusCode="Timeout" />
</customErrors>
Any ideas why this isn't working?
Thanks,

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jeff Smythe | last post by:
I simply want to execute some code once when a new session of my ASP.NET application is started (I'm not using session state for anything else - just writing some data to a database). I thought...
1
by: Poppy | last post by:
Is it possible for me to increase the time before a session times out and do it in the global or webconfig files ? In asp I used to put session.timeout = whatever in the session start event of...
3
by: Jim Heavey | last post by:
My session do not appear to be timing out. When I save something in ViewState, my expectation is that if no interaction occurs within the specified time, that the session variable would be null. Is...
4
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site...
11
by: Vishal | last post by:
Hello, can anybody tell me how I can extend the session expiry time? Is it done via code or via IIS? Sorry I am new and dont know about this.
2
by: Lars Netzel | last post by:
There's a setting in the IIS where I have set Enabled Session Timeout to 20 minutes Then there's a setting in the WebConfig file.. <sessionState mode="InProc"...
5
by: serge calderara | last post by:
Dear all, I have an application that use session state without any trouble when my SessionState element of my webConfig file is set to "InProc" Then I just try some test to make it work as out...
2
by: Aryan | last post by:
Hi, I have put my session related parameter in web.config under system.web, given below is the code for same. <system.web> <sessionState timeout ="1440" mode ="InProc" /> </system.web> this...
3
by: trullock | last post by:
Hi, I want to test some session timeout code ive written but im getting a few problems. I want to reduce the session timeout to 1min so i dont have to wait around for 20 min to see if my code...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.