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

Exception don't fire with RadAjaxManager

3 Answers 180 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
ephillipe
Top achievements
Rank 2
ephillipe asked on 06 Mar 2009, 03:02 PM
Hi,
I testing the RadAjaxManager version 2008.2.1001.35 and have the folow problem:
When I cause a Exception, this exception don't is showed for my client. If I turn off the AjaxManager, the error appear, if I turn on, the exception don't show.

Here a short sample of my test:
    public partial class _Default : System.Web.UI.Page 
    { 
        protected void Page_Load(object sender, EventArgs e) 
        { 
 
        } 
 
        protected void Button1_Click(object sender, EventArgs e) 
        { 
            throw new Exception("Erro aqui"); 
        } 
    } 

Exception with RadAjaxManager enabled:
[Exception... "'Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Erro aqui' when calling method: [nsIDOMEventListener::handleEvent]"  nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)"  location: "JS frame :: chrome://firebug/content/spy.js :: onHTTPSpyReadyStateChange :: line 497"  data: no] 
http://localhost:2296/ScriptResource.axd?d=1GY4RXHYwBwgKWzh2AM6bUDkaYg5j8XpWH_s9iPzAysRQSXCRcmHBSLn7X8KRD15vb_BkPhMpI8wtG864MygjTVbihyBlzvoYm32GnlMsw81&t=ffffffff81a68333 
Line 6391 

Exception with
 Erro aqui 
Descrição: Ocorreu uma exceção não tratada durante a execução da atual solicitação da Web. Examine o rastreamento de pilha para obter mais informações sobre o erro e onde foi originado no código. 
 
Detalhes da Exceção: System.Exception: Erro aqui 
 
Erro de Origem: 
 
Linha 17:         protected void Button1_Click(object sender, EventArgs e) 
Linha 18:         { 
Linha 19:             throw new Exception("Erro aqui"); 
Linha 20:         } 
Linha 21:     } 
 
 
Arquivo de Origem: D:\Pessoal\MeusDocumentos\Visual Studio 2008\Projects\WebApplication2\WebApplication2\Default.aspx.cs    Linha: 19  


3 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 07 Mar 2009, 03:36 PM
Hi ephillipe,

I tested your scenario in the attached sample. As you can see when you click the button there, an alert appear displaying the exception message. Note that when a page is ajaxified, the error messages are shown in alert popups.
Find more about error handling with Ajax here.

Best wishes,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
ephillipe
Top achievements
Rank 2
answered on 09 Mar 2009, 04:49 PM
Hi Iana,
I test your attached application and works. But if I change the Framework of application for 3.5, the error do not is displayed in a popup any more. The error is displayed, in my case, on a status bar of IE and in console error's of Firefox.

thanks for help,
Erick Almeida.
0
Accepted
Iana Tsolova
Telerik team
answered on 10 Mar 2009, 03:58 PM
Hi ephillipe,

Yes, you are right, in .NET 3.5 the error handling with AJAX is a bit different from this in .NET 2.0. In this case, I suggest that you try the below approaches:

Check it out and let me know if you need further directions/help.

Kind regards,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Ajax
Asked by
ephillipe
Top achievements
Rank 2
Answers by
Iana Tsolova
Telerik team
ephillipe
Top achievements
Rank 2
Share this question
or