This is a migrated thread and some comments may be shown as answers.

JS Error Sys.WebForms.PageRequestManagerTimeoutException

8 Answers 147 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Hrushikesh Mokashi
Top achievements
Rank 1
Hrushikesh Mokashi asked on 29 Sep 2008, 10:28 AM
Hi All,

I am using RadControl Q2 2008 and .net 3.5

In page contain the following control
label, button,RadAjaxManager,RadAjaxLoadingPanel,RadScriptManager

Button is ajaxified.

on button click i am calling webservice method. and
if error occured i set the error in Lable

But on Button click it gives the javascript error as '
Error: Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out.

When i press continue option of js Error , it goes to exception of codebehind
Where i set the error in lable and insert error in database.

It insert the error in table but not showing the error in lable.
 Thanks

8 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 29 Sep 2008, 11:20 AM
Hi Hrushikesh,

Could you please send a sample project or at least the problematic page so I can investigate the issue and turn back with a resolution?

Additionally, you can check if you receive any errors if you disable the ajax of the RadAjaxManager (EnableAjax=false) or replace it with MS UpdatePanel.

Find more information on troubleshooting RadAjax:
http://www.telerik.com/help/aspnet-ajax/ajxerrorhandling.html
http://www.telerik.com/help/aspnet-ajax/ajxcontenttype.html
http://www.telerik.com/help/aspnet-ajax/ajxmostcommonmistakes.html
 
Let me know how it goes.

Sincerely yours,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Hrushikesh Mokashi
Top achievements
Rank 1
answered on 29 Sep 2008, 01:01 PM

Hi All,


Here is the Sample code
Ajax setting for button are followes

             <telerik:AjaxSetting AjaxControlID="btnAdd">
                  <UpdatedControls>
                      <telerik:AjaxUpdatedControl ControlID="pnlTest"
                          LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="lblErrorMsg"
                          LoadingPanelID="" /> 
                         
                         </UpdatedControls>
              </telerik:AjaxSetting>


  //Aspx Page Control are

<table>
<tr>
<td> 
<asp:Panel ID="pnlTest" runat ="server" width ="600px">
 
        </asp:Panel>
</td>
</tr>

 <tr>
<td>
<asp:Button ID="btnAdd" runat="server" Text="Add"
            Font-Names="Verdana" Font-Size="X-Small" Width="120px" />
        &nbsp;
</td>
</tr>
<tr>
</td>

<asp:Label ID="lblNewErr" runat="server" Font-Names="Verdana"
                        Font-Size="X-Small" ForeColor="Red" Height="26px" Width="612px">
</asp:Label>

</td>
</tr>  

 

//Code behind
//Button Click Event.

Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click
        Try

     ///Here is code which call webservice
//Exception occur
Catch ex As Exception
            lblErrorMsg.Text = lblErrorMsg.Text & ex.Message
                    'Me.RadAjaxManager1.ResponseScripts.Add("document.getElementById('lblErrorMsg').innerText='" & lblErrorMsg.Text.Trim() & "';")                          

End Try

End Sub

   
 
0
Iana Tsolova
Telerik team
answered on 29 Sep 2008, 01:26 PM
Hi Hrushikesh Mokashi,

Thank you sending a sample code.

I prepared a sample project using the preceding code in order to replicate the issue but no avail. PLease find it attached and let me know how it works on you end and what differs in your case.

Sincerely yours,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Hrushikesh Mokashi
Top achievements
Rank 1
answered on 29 Sep 2008, 02:02 PM
Hi All,

In your code it does not goes in exception.

In My Case

It First give me a javascript error and then it execute exception in codebehind

where i set the error in lable.

But this is not happened in your code.
Thanks
0
Iana Tsolova
Telerik team
answered on 29 Sep 2008, 03:03 PM
Hello Hrushikesh,

Could you please try disable the ajax (set the EnableAjax property of the RadAjaxManager to false) then and let me know what happens?

I suggest that you modify the sample I sent you so the error is reproducible and send it back. Thus I could investigate the source of it and find a resolution for you.

Kind regards,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Hrushikesh Mokashi
Top achievements
Rank 1
answered on 30 Sep 2008, 06:35 AM
Hi All,

When i set the EnableAjax property of the RadAjaxManager to false
It works. But i want to show loading panel on button click.

Secondly, I am not able to send you the webservice.
The webservice that you have created is working fine. i am not sure how can I produce TimeOut error in that webservice.

If my webservice returns any error (e.g. dealer id is invalid) then I am able to show it in the error label. This is not working with only 'Timed out' exception.

Let me describe you the exact scene.

Suppose I am passing invalid dealer id to webservice then webservic returns me error.
This time control is at server side only so I can show error in the label in Catch block.(lblError.text=ex.Message).

Now, suppose if there is problem with the webservice and it is taking too long  to connect the webservice.
This time webservice returns a javascript ''Timed out' error. and after that it goes to server side 'Catch' block. It assigns error message to the label (lblError.text=ex.Message) but then somehow (possibly due to Ajax) it refreshes value of label to "" (i.e. previous value).

Please help me. It's reall y urgent :(

Best Regards,
Hrushikesh.


Thanks
0
Hrushikesh Mokashi
Top achievements
Rank 1
answered on 30 Sep 2008, 07:14 AM
Hi All,

When i set the EnableAjax property of the RadAjaxManager to false
It works. But i want to show loading panel on button click.

Secondly, I am not able to send you the webservice.
The webservice that you have created is working fine. i am not sure how can I produce TimeOut error in that webservice.

If my webservice returns any error (e.g. dealer id is invalid) then I am able to show it in the error label. This is not working with only 'Timed out' exception.

Let me describe you the exact scene.

Suppose I am passing invalid dealer id to webservice then webservic returns me error.
This time control is at server side only so I can show error in the label in Catch block.(lblError.text=ex.Message).

Now, suppose if there is problem with the webservice and it is taking too long  to connect the webservice.
This time webservice returns a javascript ''Timed out' error. and after that it goes to server side 'Catch' block. It assigns error message to the label (lblError.text=ex.Message) but then somehow (possibly due to Ajax) it refreshes value of label to "" (i.e. previous value).

Please help me. It's reall y urgent :(

Best Regards,
Hrushikesh.


Thanks
0
Iana Tsolova
Telerik team
answered on 30 Sep 2008, 08:16 AM
Hi Hrushikesh,

Thank you for the detailed explanation.

In this case I suggest that you review this help topic on error handling with Ajax. Give it a try and let me know if this helps.

Greetings,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Hrushikesh Mokashi
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Hrushikesh Mokashi
Top achievements
Rank 1
Share this question
or