PDA

View Full Version : [CLOSED] Change the timeout globally



RCN
Jun 26, 2012, 5:28 PM

Daniil
Jun 26, 2012, 8:47 PM
Hi,

The following sets up the AJAX timeout golbally:

Ext.Ajax.timeout = 120000;
Ext.net.DirectEvent.timeout = 120000;

You can just place that code into a page <head>.

Regarding Store. The approach above will set up the timeout for the Store AJAX as well. To set up a custom timeout, please use the Timeout property of the AjaxProxy.

RCN
Jun 26, 2012, 8:51 PM
I have not understood what you mean "Store AJAX". Could you explain better?

Daniil
Jun 26, 2012, 9:05 PM
Well, I meant any AJAX requests initiated by the Store/Proxy pair.

For example, if you set up the AjaxProxy with some Url, that proxy will initiate AJAX requests to load a data from the defined Url. AjaxProxy uses the Ext.Ajax. So, the following setting

Ext.Ajax.timeout = 120000;
will be used.

The same for the saving AJAX requests of the AjaxProxy.

RCN
Jun 27, 2012, 11:02 AM
Understood, thank you Daniil, please mark it as closed.

VirtualArtists
Nov 26, 2013, 8:13 AM
Hi : We are trying to implement the above settings in the C# code behind (Ext.Net 2.x) but getting the following errors:

http://screencast.com/t/tdmlrKYwO
http://screencast.com/t/uN9BzlK0

We also have include code: using Ext.Net;
What are we missing? We tried in the markup <head>, but also got errors. Where exactly does this code go? :


Ext.Ajax.timeout = 120000;
Ext.net.DirectEvent.timeout = 120000;

Could you give a quick code sample of how to implement this code? Please assist, thanks...

Daniil
Nov 26, 2013, 11:33 AM
It is JavaScript. It should be put into a page's <head> wrapped in a <script> tag.

<head runat="server">
<title>Ext.NET v2 Example</title>

<script type="text/javascript">
Ext.Ajax.timeout = 120000;
Ext.net.DirectEvent.timeout = 120000;
</script>
</head>

Daniil
Feb 04, 2014, 7:48 AM
We added the AjaxTimeout global property.
http://forums.ext.net/showthread.php?27981&p=124634&viewfull=1#post124634