hey folks,
im having a little problem w/ my RadGrid... when the user enters Edit mode, makes a change, and submits the change (firing the OnUpdateCommand event handler), occasionally my code will have to wait a long time to complete the update attempt on the backend (my code calls a web service). the problem -- it takes our web service 2 minutes to timeout in .NET code-behind (which is handled properly and *should* return a friendly status message), but the grid produces a javacript error before that, at exactly 90 seconds. at this point IE 8 shows a broken-javascript icon in the status bar, and my post-Update code to return the friendly message is not rendered on screen.
pic attached.
can i set a longer timeout value on the Grid before it breaks?
thanks,
matt
im having a little problem w/ my RadGrid... when the user enters Edit mode, makes a change, and submits the change (firing the OnUpdateCommand event handler), occasionally my code will have to wait a long time to complete the update attempt on the backend (my code calls a web service). the problem -- it takes our web service 2 minutes to timeout in .NET code-behind (which is handled properly and *should* return a friendly status message), but the grid produces a javacript error before that, at exactly 90 seconds. at this point IE 8 shows a broken-javascript icon in the status bar, and my post-Update code to return the friendly message is not rendered on screen.
pic attached.
can i set a longer timeout value on the Grid before it breaks?
thanks,
matt
6 Answers, 1 is accepted
0
Jayesh Goyani
Top achievements
Rank 2
answered on 22 Jul 2013, 05:19 AM
Hello,
Please try with the below code snippet.
Let me know if any concern.
Thanks,
Jayesh Goyani
Please try with the below code snippet.
WebService1 object = new WebService1();object.Timeout = -1;Let me know if any concern.
Thanks,
Jayesh Goyani
0
matt
Top achievements
Rank 1
answered on 22 Jul 2013, 10:42 PM
how will changing the timeout on my server-side service object stop the RadGrid from throwing a JavaScript error after 90 seconds?
0
Jayesh Goyani
Top achievements
Rank 2
answered on 23 Jul 2013, 06:28 AM
Hello,
You are calling web service from JavaScript or from UpdateCommand.
If you called the web service from UpdateCommand then please try with the below code snippet.
Or you can also set this time out from web config.
Let me know if any concern.
Thanks,
Jayesh Goyani
You are calling web service from JavaScript or from UpdateCommand.
If you called the web service from UpdateCommand then please try with the below code snippet.
WebService1 object = new WebService1();object.Timeout = -1;Or you can also set this time out from web config.
<system.web> <httpRuntime executionTimeout="1000"/>
</system.web>Let me know if any concern.
Thanks,
Jayesh Goyani
0
matt
Top achievements
Rank 1
answered on 23 Jul 2013, 03:42 PM
ah ok, yes -- it turns out the default timeout of the ASP.NET executions is 90 seconds. as you say this can be changed in the machine.config or web.config to something longer:
...alternatively, i can shorten the value of the WebClientProtocol.Timeout, setting it to something <90 seconds, like 60 seconds:
...but setting the service.Timeout to -1 and not extending the httpRunTime executionTimeout was not helpful -- the ASP.NET page execution would still end at 90 seconds. so i had to either change the executionTimeout to >120, or the service.Timeout <90.
thanks,
matt
<system.web>
<httpRuntime executionTimeout="130" />
</system.web>...alternatively, i can shorten the value of the WebClientProtocol.Timeout, setting it to something <90 seconds, like 60 seconds:
service.Timeout = 60000; //60 seconds...but setting the service.Timeout to -1 and not extending the httpRunTime executionTimeout was not helpful -- the ASP.NET page execution would still end at 90 seconds. so i had to either change the executionTimeout to >120, or the service.Timeout <90.
thanks,
matt
0
Jayesh Goyani
Top achievements
Rank 2
answered on 24 Jul 2013, 06:36 AM
Hello,
Can you please try with infinite?
http://msdn.microsoft.com/en-us/library/system.web.services.protocols.webclientprotocol.timeout.aspx
Thanks,
Jayesh Goyani
Can you please try with infinite?
http://msdn.microsoft.com/en-us/library/system.web.services.protocols.webclientprotocol.timeout.aspx
Thanks,
Jayesh Goyani
0
matt
Top achievements
Rank 1
answered on 24 Jul 2013, 05:43 PM
i already did. as i said:
"setting the service.Timeout to -1 and not extending the httpRunTime executionTimeout was not helpful -- the ASP.NET page execution would still end at 90 seconds."
...by setting the timeout to -1 (infinite) on the web service, it (the web service) will run forever. yet the ASP.NET page, in which the RadGrid operates, still times out at 90 seconds, since thats the default timeout for the HTTP execution per the machine/web config.
"setting the service.Timeout to -1 and not extending the httpRunTime executionTimeout was not helpful -- the ASP.NET page execution would still end at 90 seconds."
...by setting the timeout to -1 (infinite) on the web service, it (the web service) will run forever. yet the ASP.NET page, in which the RadGrid operates, still times out at 90 seconds, since thats the default timeout for the HTTP execution per the machine/web config.