Monday, March 26, 2012

Pagemethods timeout

Is there a built in way to timeout a pagemethod request?
I have tried this

PageMethods.Timeout(key, OnSucceeded, OnFailed,OnTimeOut);

But the OnTimeOut Method never gets called.


The Current version does not have explicit OnTime Callback like the previous versioin instead it is handled in the OnError Callback. Like the Following:

SimpleService.SimpleMethod(function(result) // Success Handler
{
},
function(exceptioin) // Error Handler
{
if (exception.get_timeout())
{
// Timeout
}
else
{
//All other error.
}
}
);


Thank you for your reply.

I have tried this and I still do not get any call to the Error function.

Is there a place where I can look at the documentation for this. I have been searching for it but can't find anything.


Does your Succes Handler Executes, Did you enabled the ScriptManager EnablePageMethods?


Yes, the success handler does execute. Is there a way to set the timeout time? Maybe it is just too long.

Even it takes long time the OnError Callback should be executed. Anyway you can increase the timeout by setting like the following:

PageMethods.set_timout(120);

I have seen the light :) Thanks so much for your help.
It would be nice if this was documented somewhere.

Thanks again.


Would you mind posting the codes, so that i can investigate.

No comments:

Post a Comment