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

Response.Redirect after exception being throw during AJAX call

4 Answers 172 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
LamKhoa
Top achievements
Rank 1
LamKhoa asked on 22 Sep 2013, 02:58 AM
Hi All,

Whenever an exception error is thrown, the Application_Error (in Global.ascx) is fired, but neither Response.Redirect or Server.Transfer works.

I tried the same thing with Page_Error (on individual page), it works.

Is there any workaround to make it works in Application_Error like it is in Page_Error?

Thanks All.

4 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 25 Sep 2013, 11:41 AM
Hello,

If you're looking for Error Management, you're better off using Server.GetLastError() so you get the full Exception object including stack trace.

Here's an MSDN article that deals with Application Errors in general and uses Server.GetLastError().


Regards,
Maria Ilieva
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
LamKhoa
Top achievements
Rank 1
answered on 25 Sep 2013, 02:07 PM
Yes, I know about that and I have set so that an email will be automatically be sent to me about that Exception error. However, I still can't get the page to be transfer, I don't like the fact that user stuck in the broken page and don't know why it is not responding no more.

Thanks

Lamk
0
Accepted
Maria Ilieva
Telerik team
answered on 30 Sep 2013, 08:43 AM
Hi LamKhoa,

After further revising the ticket and noticed the additional info in the ticket title I would conclude that the issue is actually causing by the fact you are using Ajax requests to the server instead of regular postback. Note that the required functionality could not be achieved when Ajax is used. Therefore please disable the ajax on the page and verify how it goes.

Regards,
Maria Ilieva
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
LamKhoa
Top achievements
Rank 1
answered on 01 Oct 2013, 03:50 AM
Thanks. If so, I rather stick to use Page_Error event on each individual page.
Tags
Ajax
Asked by
LamKhoa
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
LamKhoa
Top achievements
Rank 1
Share this question
or