|
|
Question : how do I catch a server status code 503 on a .NET page utilizing AJAX timers ?
|
|
I have an ASP.NET page that utilizes AJAX to do postbacks every 90 seconds. However, periodically the server returns a 503 status code and then this annoying pop-up appears saying..."System.WebForms.PageRequestManagerServerErrrorException........The status code returned from the server is 503"
Is there a way to catch this error either on the client or sever? Ideally, Id like to ignore it. NOTE: I AM NOT USING THE HTTPREQUEST OBJECT TO DO THE POSTBACKS. THE TIMER AND UPDATEPANEL ARE DOING THEM AUTOMATICALLY
Do I attach an event to the Script Manager_AsyncPostBackError event ?? If so, how do i check & see if code 503 was returned ? Or is there another solution ?
thanks in advance for all your help
|
Answer : how do I catch a server status code 503 on a .NET page utilizing AJAX timers ?
|
|
here is a good example to start using ajax error handling http://asp.net/ajax/Documentation/live/tutorials/CustomizingErrorHandlingforUpdatePanel.aspx as for checking the status, I think you can use the error property of the args parameter to check the status if(error.httpStatusCode==503) { //Do something } look at the posted link first
|
|
|
|