PDA

View Full Version : [CLOSED] [#428] Globally increase Ajax timeout for DirectMethod calls?



rthiney
Feb 03, 2014, 3:00 PM
Is there a way to globally set the Ajax timeout for all DirectMethod calls across entire site?

geoffrey.mcgill
Feb 03, 2014, 4:12 PM
I thought we had a Global property for AjaxTimeout, but apparently not. Best I could find for the moment is:

http://forums.ext.net/showthread.php?19763-CLOSED-Change-the-timeout-globally&p=121724&viewfull=1#post121724

We're going to add .AjaxTimeout as a Global property, which will be available on the ResourceManager, in the Web.config, Session and Application objects.

This new property should be committed to Svn right away.

geoffrey.mcgill
Feb 03, 2014, 4:13 PM
Created new Issue to track this property:

https://github.com/extnet/Ext.NET/issues/428

rthiney
Feb 03, 2014, 4:32 PM
Created new Issue to track this property:

https://github.com/extnet/Ext.NET/issues/428

Right on, thanks Geoff..will use work around until...

Daniil
Feb 04, 2014, 8:47 AM
Done in revision 5645. It will go to the v2.5 release.

ResourceManager

<ext:ResourceManager runat="server" AjaxTimeout="120000" />

Web.config

<extnet ajaxTimeout="120000" />

It is also possible to set up via Application or Session global objects.

Application["Ext.Net.AjaxTimeout"] = 120000;

michaeld
Feb 04, 2014, 10:47 AM
Thank you for this suggestion and addition. This will definitely help while debugging. I time-out a lot when I'm stepping through code.

michaeld
Feb 04, 2014, 11:52 AM
I would additionally like to request this value be in seconds instead of milliseconds.

Daniil
Feb 04, 2014, 12:00 PM
Thank you for the feedback, @michaeld!

Daniil
Feb 04, 2014, 12:30 PM
I would additionally like to request this value be in seconds instead of milliseconds.

It makes good sense. It is very unlikely that an AjaxTimeout is going to be less than 1 second.

Well, originally, we followed ExtJS (maybe, a bit blindly). There is milliseconds used for such properties.

Ok, if we change AjaxTimeout to seconds, a developer would expect all Timeout settings to be in seconds. For example,

<ext:AjaxProxy Timeout="30" />
But it is in milliseconds currently. So, there will be inconsistency.

If change an AjaxProxy's Timeout and others to seconds we get a breaking change. Is it worth enough despite introducing such a breaking change? I am not sure.

Again, I agree seconds looks much better for that, but in the current situation I would probably leave milliseconds.

What do you think, Geoffrey?

ALobpreis
May 30, 2014, 4:28 PM
Hi, Daniil,

In my opinion, perhaps a good option would be to create another property, for example "TimeoutInSeconds", so you avoid creating a breaking change. Of course, both properties would change each other and affect the same internal timeout value.
Another option is to let the current timeout property accept values like "30s".

That's my 2 cents.

Regards,

Andrew

Daniil
May 30, 2014, 5:04 PM
@ALobpreis, thank you for sharing your thoughts.