Showing posts with label timeout. Show all posts
Showing posts with label timeout. Show all posts

Saturday, March 31, 2012

Set application timeout to more than 3 minutes

I have a custom VB.net application that runs a query against an SQL
server that takes more than 3 minutes. Right now after 3 minutes it
times out. So far after doing my research I have changed the following:

in web.config:
<system.web>

<httpRuntime executionTimeout="1000" maxRequestLength="2000000"/>
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="600"/>

In the page itself:

Me.SqlConnection1.ConnectionString = "workstation id=OBANG;packet
size=4096;user id=sa;data source=OBANG;persist securi" & _
"ty info=False;initial catalog=YZA; Connect Timeout=600 "
Me.SqlSelectCommand1.CommandTimeout = 600

The page still times out after 3 min. Is there anything that I am
missing?

Thanks in advance.dadocsis wrote:

Quote:

Originally Posted by

I have a custom VB.net application that runs a query against an SQL
server that takes more than 3 minutes. Right now after 3 minutes it
times out. So far after doing my research I have changed the following:
>
in web.config:
<system.web>
>
<httpRuntime executionTimeout="1000" maxRequestLength="2000000"/>
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="600"/>
>
In the page itself:
>
Me.SqlConnection1.ConnectionString = "workstation id=OBANG;packet
size=4096;user id=sa;data source=OBANG;persist securi" & _
"ty info=False;initial catalog=YZA; Connect Timeout=600 "
Me.SqlSelectCommand1.CommandTimeout = 600
>
>
The page still times out after 3 min. Is there anything that I am
missing?
>
Thanks in advance.
>


If memory serves me right, there is a connection timeout setting in
mssql thats in seconds; What is yours set to?

Joe (MCAD)
Hi,

Would you please post the detailed exception when the page times out? Try
to visit it on localhost so that you can see the detailed exception.

I think this might not be related to the sql query's time out settings.
Anyway, let's see the exception first.

Sincerely,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...rt/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Sorry it took me so long to write back. Yesterday was hectic.

I didnt mention that I already set the SQL server query timeout to 600
sec.

Here is the detailed exception:

Server Error in '/YZA_Remote' Application.
------------------------

Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Timeout expired.
The timeout period elapsed prior to completion of the operation or the
server is not responding.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException: Timeout expired. The timeout period elapsed prior to
completion of the operation or the server is not responding.]
System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742
System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior
behavior) +45

System.Data.SqlClient.SqlCommand.System.Data.IDbCo mmand.ExecuteReader(CommandBehavior
behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
YZA_Remote.OrderControl.InitGridData() +8219
YZA_Remote.OrderControl.btnFetchNewData_Click(Obje ct sender,
EventArgs e) +49
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+33
System.Web.UI.Page.ProcessRequestMain() +1273

Walter Wang [MSFT] wrote:

Quote:

Originally Posted by

Hi,
>
Would you please post the detailed exception when the page times out? Try
to visit it on localhost so that you can see the detailed exception.
>
I think this might not be related to the sql query's time out settings.
Anyway, let's see the exception first.
>
Sincerely,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
>
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.
>
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...rt/default.aspx.
==================================================
>
This posting is provided "AS IS" with no warranties, and confers no rights.


Hi,

Hope you're better now.

For page execution time out setting, it's only effective in Release mode:

#httpRuntime Element (ASP.NET Settings Schema)
http://msdn2.microsoft.com/en-us/library/e1f13641.aspx
executionTimeoutOptional TimeSpan attribute.

Specifies the maximum number of seconds that a request is allowed to
execute before being automatically shut down by ASP.NET.

This time-out applies only if the debug attribute in the compilation
element is False. To help to prevent shutting down the application while
you are debugging, do not set this time-out to a large value.

The default is "00:01:50" (110 seconds).Note

In the .NET Framework 1.0 and 1.1, the default is 90.
#############

From the exception and stack trace, it seems related to ADO.NET query timed
out. To confirm this issue is not related to ASP.NET, try to issue the
query in a WinForm or Console application. Normally you only need to set
the connection time out in the connection string and you set the command
time out in CommandTimeOut property. This should work as expected. Anyway,
let's first narrow down the issue to see if it's related to ASP.NET or not.

Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Thanks 4 the response. Can I run the query in "Query analyzer?"

Walter Wang [MSFT] wrote:

Quote:

Originally Posted by

Hi,
>
Hope you're better now.
>
For page execution time out setting, it's only effective in Release mode:
>
#httpRuntime Element (ASP.NET Settings Schema)
http://msdn2.microsoft.com/en-us/library/e1f13641.aspx
executionTimeoutOptional TimeSpan attribute.
>
Specifies the maximum number of seconds that a request is allowed to
execute before being automatically shut down by ASP.NET.
>
This time-out applies only if the debug attribute in the compilation
element is False. To help to prevent shutting down the application while
you are debugging, do not set this time-out to a large value.
>
The default is "00:01:50" (110 seconds).Note
>
In the .NET Framework 1.0 and 1.1, the default is 90.
#############
>
>
From the exception and stack trace, it seems related to ADO.NET query timed
out. To confirm this issue is not related to ASP.NET, try to issue the
query in a WinForm or Console application. Normally you only need to set
the connection time out in the connection string and you set the command
time out in CommandTimeOut property. This should work as expected. Anyway,
let's first narrow down the issue to see if it's related to ASP.NET or not.
>
>
Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
>
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
>
This posting is provided "AS IS" with no warranties, and confers no rights.


I suggest create a simple Console application and use the same database
access code in your web application to test it, this way we could know if
it's related to ASP.NET or not.

Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Walter Wang [MSFT] wrote:

Quote:

Originally Posted by

I suggest create a simple Console application and use the same database
access code in your web application to test it, this way we could know if
it's related to ASP.NET or not.
>
>
Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
>
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
>
This posting is provided "AS IS" with no warranties, and confers no rights.


Walter Sorry for the delayed response again. I am going to have to hold
off on this for a little while. I am not a programmer I just have a
little light programming experience with VB based languages. The
program was initially created by an experienced coder and due to $ my
company doesnt want to hire him again to fix this problem so this is
why I am stuck with it. The query comes from a complex stored
proceedure that is like 10 pages long! It will take me some time to
build a Console app. so I will have to hold off on this when I am not
so busy. Thanks for your time.

Set application timeout to more than 3 minutes

I have a custom VB.net application that runs a query against an SQL
server that takes more than 3 minutes. Right now after 3 minutes it
times out. So far after doing my research I have changed the following:
in web.config:
<system.web>
<httpRuntime executionTimeout="1000" maxRequestLength="2000000"/>
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="600"/>
In the page itself:
Me.SqlConnection1.ConnectionString = "workstation id=OBANG;packet
size=4096;user id=sa;data source=OBANG;persist securi" & _
"ty info=False;initial catalog=YZA; Connect Timeout=600 "
Me.SqlSelectCommand1.CommandTimeout = 600
The page still times out after 3 min. Is there anything that I am
missing?
Thanks in advance.dadocsis wrote:
> I have a custom VB.net application that runs a query against an SQL
> server that takes more than 3 minutes. Right now after 3 minutes it
> times out. So far after doing my research I have changed the following:
> in web.config:
> <system.web>
> <httpRuntime executionTimeout="1000" maxRequestLength="2000000"/>
> <sessionState
> mode="InProc"
> stateConnectionString="tcpip=127.0.0.1:42424"
> sqlConnectionString="data
> source=127.0.0.1;Trusted_Connection=yes"
> cookieless="false"
> timeout="600"/>
> In the page itself:
> Me.SqlConnection1.ConnectionString = "workstation id=OBANG;packet
> size=4096;user id=sa;data source=OBANG;persist securi" & _
> "ty info=False;initial catalog=YZA; Connect Timeout=600 "
> Me.SqlSelectCommand1.CommandTimeout = 600
>
> The page still times out after 3 min. Is there anything that I am
> missing?
> Thanks in advance.
>
If memory serves me right, there is a connection timeout setting in
mssql thats in seconds; What is yours set to?
Joe (MCAD)
Hi,
Would you please post the detailed exception when the page times out? Try
to visit it on localhost so that you can see the detailed exception.
I think this might not be related to the sql query's time out settings.
Anyway, let's see the exception first.
Sincerely,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
========================================
==========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscript...t/default.aspx.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.
Sorry it took me so long to write back. Yesterday was hectic.
I didnt mention that I already set the SQL server query timeout to 600
sec.
Here is the detailed exception:
Server Error in '/YZA_Remote' Application.
----
--
Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Timeout expired.
The timeout period elapsed prior to completion of the operation or the
server is not responding.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException: Timeout expired. The timeout period elapsed prior to
completion of the operation or the server is not responding.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
behavior) +45
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(Comman
dBehavior
behavior) +5
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
YZA_Remote.OrderControl.InitGridData() +8219
YZA_Remote.OrderControl.btnFetchNewData_Click(Object sender,
EventArgs e) +49
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePo
stBackEvent(String
eventArgument) +57
System.Web.UI.Page. RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+33
System.Web.UI.Page.ProcessRequestMain() +1273
Walter Wang [MSFT] wrote:
> Hi,
> Would you please post the detailed exception when the page times out? Try
> to visit it on localhost so that you can see the detailed exception.
> I think this might not be related to the sql query's time out settings.
> Anyway, let's see the exception first.
> Sincerely,
> Walter Wang (wawang@.online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
> ========================================
==========
> Get notification to my posts through email? Please refer to
> [url]http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif[/ur
l]
> ications. If you are using Outlook Express, please make sure you clear the
> check box "Tools/Options/Read: Get 300 headers at a time" to see your repl
y
> promptly.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscript...t/default.aspx.
> ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no rights.[/color
]
Hi,
Hope you're better now.
For page execution time out setting, it's only effective in Release mode:
#httpRuntime Element (ASP.NET Settings Schema)
http://msdn2.microsoft.com/en-us/library/e1f13641.aspx
executionTimeout Optional TimeSpan attribute.
Specifies the maximum number of seconds that a request is allowed to
execute before being automatically shut down by ASP.NET.
This time-out applies only if the debug attribute in the compilation
element is False. To help to prevent shutting down the application while
you are debugging, do not set this time-out to a large value.
The default is "00:01:50" (110 seconds).Note
In the .NET Framework 1.0 and 1.1, the default is 90.
#############
From the exception and stack trace, it seems related to ADO.NET query timed
out. To confirm this issue is not related to ASP.NET, try to issue the
query in a WinForm or Console application. Normally you only need to set
the connection time out in the connection string and you set the command
time out in CommandTimeOut property. This should work as expected. Anyway,
let's first narrow down the issue to see if it's related to ASP.NET or not.
Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.
Thanks 4 the response. Can I run the query in "Query analyzer?"
Walter Wang [MSFT] wrote:
> Hi,
> Hope you're better now.
> For page execution time out setting, it's only effective in Release mode:
> #httpRuntime Element (ASP.NET Settings Schema)
> http://msdn2.microsoft.com/en-us/library/e1f13641.aspx
> executionTimeout Optional TimeSpan attribute.
> Specifies the maximum number of seconds that a request is allowed to
> execute before being automatically shut down by ASP.NET.
> This time-out applies only if the debug attribute in the compilation
> element is False. To help to prevent shutting down the application while
> you are debugging, do not set this time-out to a large value.
> The default is "00:01:50" (110 seconds).Note
> In the .NET Framework 1.0 and 1.1, the default is 90.
> #############
>
> From the exception and stack trace, it seems related to ADO.NET query time
d
> out. To confirm this issue is not related to ASP.NET, try to issue the
> query in a WinForm or Console application. Normally you only need to set
> the connection time out in the connection string and you set the command
> time out in CommandTimeOut property. This should work as expected. Anyway,
> let's first narrow down the issue to see if it's related to ASP.NET or not
.
>
> Regards,
> Walter Wang (wawang@.online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
> ========================================
==========
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no rights.[/color
]
I suggest create a simple Console application and use the same database
access code in your web application to test it, this way we could know if
it's related to ASP.NET or not.
Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.
Walter Wang [MSFT] wrote:
> I suggest create a simple Console application and use the same database
> access code in your web application to test it, this way we could know if
> it's related to ASP.NET or not.
>
> Regards,
> Walter Wang (wawang@.online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
> ========================================
==========
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no rights.[/color
]
Walter Sorry for the delayed response again. I am going to have to hold
off on this for a little while. I am not a programmer I just have a
little light programming experience with VB based languages. The
program was initially created by an experienced coder and due to $ my
company doesnt want to hire him again to fix this problem so this is
why I am stuck with it. The query comes from a complex stored
proceedure that is like 10 pages long! It will take me some time to
build a Console app. so I will have to hold off on this when I am not
so busy. Thanks for your time.

Tuesday, March 13, 2012

Set Postback or Session Timeout

Hi All.
I have a page that users enter information in text boxes...and
sometimes it's a lot of information. There are times that these folks
either take their time entering the info or do other things before they
submit the page. Unfortunately, if they do take their time, there are
times where the session times out and they can no longer submit their
information, resulting in an error and pretty peeved users.
What I'm asking for help on is...can, possibly through a timer or
something either reset the session or do a postback? This would be to
cover in case the user would take too much time to submit the
information....it would happen automatically. I do have a popup box
that warns them they are about to time out, but it might not be seen.
So far, I have tried a timer to redirect the page to itself, try to go
through the page_load and try to set the session.timeout, but none of
it looks to work. I did see some __doPostBack and Page.GetPostBackEvent
articles, but didn't see how to put them to use. They get mentioned,
but I don't see how to make them function on my page. I need some way
to try to keep the session alive and not timeout. Sorry if it's
something that's easy that I don't see. I'm still a bit (ok, well very)
new at this I have searched Google high and low and found nothing that
looks to work.
Thanks for any help you can be!!
kurtYou can:
1. Extend the length of the session timeout.
2. Store your information in ViewState instead.
"kurt" <kbaker@.granitemicrosystems.com> wrote in message
news:1115834747.970410.207850@.o13g2000cwo.googlegroups.com...
> Hi All.
> I have a page that users enter information in text boxes...and
> sometimes it's a lot of information. There are times that these folks
> either take their time entering the info or do other things before they
> submit the page. Unfortunately, if they do take their time, there are
> times where the session times out and they can no longer submit their
> information, resulting in an error and pretty peeved users.
> What I'm asking for help on is...can, possibly through a timer or
> something either reset the session or do a postback? This would be to
> cover in case the user would take too much time to submit the
> information....it would happen automatically. I do have a popup box
> that warns them they are about to time out, but it might not be seen.
> So far, I have tried a timer to redirect the page to itself, try to go
> through the page_load and try to set the session.timeout, but none of
> it looks to work. I did see some __doPostBack and Page.GetPostBackEvent
> articles, but didn't see how to put them to use. They get mentioned,
> but I don't see how to make them function on my page. I need some way
> to try to keep the session alive and not timeout. Sorry if it's
> something that's easy that I don't see. I'm still a bit (ok, well very)
> new at this I have searched Google high and low and found nothing that
> looks to work.
> Thanks for any help you can be!!
> kurt
>
kurt wrote:
> Hi All.
> I have a page that users enter information in text boxes...and
> sometimes it's a lot of information. There are times that these folks
> either take their time entering the info or do other things before
> they submit the page. Unfortunately, if they do take their time,
> there are times where the session times out and they can no longer
> submit their information, resulting in an error and pretty peeved
> users.
> What I'm asking for help on is...can, possibly through a timer or
> something either reset the session or do a postback? This would be to
> cover in case the user would take too much time to submit the
> information....it would happen automatically. I do have a popup box
> that warns them they are about to time out, but it might not be seen.
>
Maybe you can use a (small) iframe that refreshes itself every few minutes,
to keep the session alive but without submitting the entire page
(and losing scroll-position and focus).
Hans Kesting
Sorry I didn't get back sooner, but I was out for a while. I'm not
sure extending the timeout would work. If I set it to 30 minutes,
they'll probably go 31...and so on. I also wasn't sure that the
viewstate would be usable and last either. But, I did try the iframe
and so far it looks to do exactly as I needed. I also have been trying
it out and I don't look to lose focus from the control I'm currently
using when the iframe refreshes. Thanks for all the input!!
Kurt

Set Postback or Session Timeout

Hi All.
I have a page that users enter information in text boxes...and
sometimes it's a lot of information. There are times that these folks
either take their time entering the info or do other things before they
submit the page. Unfortunately, if they do take their time, there are
times where the session times out and they can no longer submit their
information, resulting in an error and pretty peeved users.

What I'm asking for help on is...can, possibly through a timer or
something either reset the session or do a postback? This would be to
cover in case the user would take too much time to submit the
information....it would happen automatically. I do have a popup box
that warns them they are about to time out, but it might not be seen.

So far, I have tried a timer to redirect the page to itself, try to go
through the page_load and try to set the session.timeout, but none of
it looks to work. I did see some __doPostBack and Page.GetPostBackEvent
articles, but didn't see how to put them to use. They get mentioned,
but I don't see how to make them function on my page. I need some way
to try to keep the session alive and not timeout. Sorry if it's
something that's easy that I don't see. I'm still a bit (ok, well very)
new at this I have searched Google high and low and found nothing that
looks to work.

Thanks for any help you can be!!

kurtYou can:
1. Extend the length of the session timeout.
2. Store your information in ViewState instead.

"kurt" <kbaker@.granitemicrosystems.com> wrote in message
news:1115834747.970410.207850@.o13g2000cwo.googlegr oups.com...
> Hi All.
> I have a page that users enter information in text boxes...and
> sometimes it's a lot of information. There are times that these folks
> either take their time entering the info or do other things before they
> submit the page. Unfortunately, if they do take their time, there are
> times where the session times out and they can no longer submit their
> information, resulting in an error and pretty peeved users.
> What I'm asking for help on is...can, possibly through a timer or
> something either reset the session or do a postback? This would be to
> cover in case the user would take too much time to submit the
> information....it would happen automatically. I do have a popup box
> that warns them they are about to time out, but it might not be seen.
> So far, I have tried a timer to redirect the page to itself, try to go
> through the page_load and try to set the session.timeout, but none of
> it looks to work. I did see some __doPostBack and Page.GetPostBackEvent
> articles, but didn't see how to put them to use. They get mentioned,
> but I don't see how to make them function on my page. I need some way
> to try to keep the session alive and not timeout. Sorry if it's
> something that's easy that I don't see. I'm still a bit (ok, well very)
> new at this I have searched Google high and low and found nothing that
> looks to work.
> Thanks for any help you can be!!
> kurt
kurt wrote:
> Hi All.
> I have a page that users enter information in text boxes...and
> sometimes it's a lot of information. There are times that these folks
> either take their time entering the info or do other things before
> they submit the page. Unfortunately, if they do take their time,
> there are times where the session times out and they can no longer
> submit their information, resulting in an error and pretty peeved
> users.
> What I'm asking for help on is...can, possibly through a timer or
> something either reset the session or do a postback? This would be to
> cover in case the user would take too much time to submit the
> information....it would happen automatically. I do have a popup box
> that warns them they are about to time out, but it might not be seen.

Maybe you can use a (small) iframe that refreshes itself every few minutes,
to keep the session alive but without submitting the entire page
(and losing scroll-position and focus).

Hans Kesting
Sorry I didn't get back sooner, but I was out for a while. I'm not
sure extending the timeout would work. If I set it to 30 minutes,
they'll probably go 31...and so on. I also wasn't sure that the
viewstate would be usable and last either. But, I did try the iframe
and so far it looks to do exactly as I needed. I also have been trying
it out and I don't look to lose focus from the control I'm currently
using when the iframe refreshes. Thanks for all the input!!

Kurt