Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ASP.NET 3.5 AJAX and default error handler

0 views
Skip to first unread message

Trapulo

unread,
Apr 15, 2008, 10:11:08 AM4/15/08
to
Hello,
with ASP.NET 2.0 Ajax every unexpected error is managed client-side with a
popup that reports the error to the user. In ASP.NET 3.5 this behavor has
been changed: how can I have a similar behavor? I'd like that every
exception raised from ASP.NET runtime during an asyncpostback is managed in
client side with a popup that reports the error message.

thanks


George Ter-Saakov

unread,
Apr 15, 2008, 10:38:55 AM4/15/08
to
I belive you have an event you can subscribe to.. So every time error
happens your Javascript function is called.


George.

"Trapulo" <trap...@noemail.noemail> wrote in message
news:utOPOKwn...@TK2MSFTNGP05.phx.gbl...

Steven Cheng [MSFT]

unread,
Apr 16, 2008, 2:18:07 AM4/16/08
to
Hi Trapulo,

As for ASP.NET ajax, you can register the event hander for client-side load
events. One of them is "EndRequest" in which we can detect whether there is
any error during the AJAX request processing. Here is web article mentioned
this:

##How to improve ASP.NET AJAX error handling
http://encosia.com/2007/07/18/how-to-improve-aspnet-ajax-error-handling/

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
>From: "Trapulo" <trap...@noemail.noemail>
>Subject: ASP.NET 3.5 AJAX and default error handler
>Date: Tue, 15 Apr 2008 16:11:08 +0200

wis...@googlemail.com

unread,
Apr 16, 2008, 3:50:02 AM4/16/08
to
Hi Trapulo,

In addition to handling errors in Javascript, you can also register an
event handler with the ScriptManager's OnAsyncPostBackError delegate.
For an example for each methods, I suggest you check out
http://msdn2.microsoft.com/en-us/library/bb398934.aspx.

==========
Regards
Steve
www.stkomp.com

Trapulo

unread,
Apr 18, 2008, 7:45:32 AM4/18/08
to
This is interesting, thanks, but I'm not sure about this. The page you
refers says:
"the default behavior is that a browser message box is displayed with an
error message"

this is true in ASP.NET 2, but with ASP.NET 3.5 nothing is displaye when an
error occurs. Why? is this a problem in my application? I think it's by
design..
I'd like to manage errors with custom UI elements as your suggestion or
Steven's one says, but first of all I need to have the standard behavor:
when an exeption is raised, a message box is displayed to the user. Whitout
to write any specific code. How can I have this in ASP.NET 3.5?

thanks


<wis...@googlemail.com> wrote in message
news:cacffc84-c773-4fa8...@e67g2000hsa.googlegroups.com...

Trapulo

unread,
Apr 18, 2008, 7:48:35 AM4/18/08
to
Steven,
the improvement you suggest is interesting. But before to create custom
client side code, I'd like to re-enable the standard behavor I had working
with ASP.NET 2.0: when an error occurs, a message box is displayed with
exception's message. i don't have this starting from ASP.NET 3.5. Is this
possible? Is there some error in my applications, if I haven't this behavor
more?

thanks

"Steven Cheng [MSFT]" <stc...@online.microsoft.com> wrote in message
news:TzH2rm4n...@TK2MSFTNGHUB02.phx.gbl...

Steven Cheng [MSFT]

unread,
Apr 27, 2008, 10:41:37 PM4/27/08
to
Hi Trapulo,

As for the error handling behavior, I will consider consult some other
ASPNET ajax engineers on this. Would you create a very simple ajax project
with a test page demonstrate the behavior so that I can directly refer the
code to other engineers. You can send it to me ("stcheng_At_microsoft.com")

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
>From: "Trapulo" <trap...@noemail.noemail>
>References: <utOPOKwn...@TK2MSFTNGP05.phx.gbl>
<TzH2rm4n...@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: ASP.NET 3.5 AJAX and default error handler
>Date: Fri, 18 Apr 2008 13:48:35 +0200

Trapulo

unread,
Apr 28, 2008, 6:29:58 AM4/28/08
to
I'll send it in a minute.


"Steven Cheng [MSFT]" <stc...@online.microsoft.com> wrote in message

news:jrPAqlNq...@TK2MSFTNGHUB02.phx.gbl...

Steven Cheng [MSFT]

unread,
Apr 29, 2008, 3:48:03 AM4/29/08
to
Thanks Trapulo,

I've got it and have forwarded the question to other AJAX engineers to see
whether they have any further ideas on this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: "Trapulo" <trap...@noemail.noemail>
>References: <utOPOKwn...@TK2MSFTNGP05.phx.gbl>
<TzH2rm4n...@TK2MSFTNGHUB02.phx.gbl>

<u$7FkoUoI...@TK2MSFTNGP03.phx.gbl>
<jrPAqlNq...@TK2MSFTNGHUB02.phx.gbl>


>Subject: Re: ASP.NET 3.5 AJAX and default error handler

>Date: Mon, 28 Apr 2008 12:29:58 +0200
>Lines: 141

Steven Cheng [MSFT]

unread,
May 1, 2008, 1:57:00 AM5/1/08
to
Hi Trapulo,

After discussing with some other AJAX engineer, for the AJAX update panel
error handling behavior ,they also recommend the error handling approach in
the below reference:

# "Handling Errors" section
http://asp.net/AJAX/Documentation/Live/overview/ScriptManagerOverview.aspx

seems the original error behavior is now changed to adopt those error
handling settings(rather than use a fixed default behavior).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

>Content-Type: text/plain
>Content-Transfer-Encoding: 7bit
>From: stc...@online.microsoft.com (Steven Cheng [MSFT])
>Organization: Microsoft
>Date: Tue, 29 Apr 2008 07:48:03 GMT


>Subject: Re: ASP.NET 3.5 AJAX and default error handler

>

0 new messages