Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

ASP.NET 3.5 AJAX and default error handler
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



Report this thread to moderator Post Follow-up to this message
Old Post
Trapulo
04-16-08 12:52 AM


Re: ASP.NET 3.5 AJAX and default error handler
I belive you have an event you can subscribe to.. So every time error
happens your Javascript function is called.


George.

"Trapulo" <trapulo2@noemail.noemail> wrote in message
news:utOPOKwnIHA.5268@TK2MSFTNGP05.phx.gbl...
> 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
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
George Ter-Saakov
04-16-08 12:52 AM


RE: ASP.NET 3.5 AJAX and default error handler
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-t...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:
msdnmg@microsoft.com.

 ========================================
==========
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscript...ault.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/subscript...t/default.aspx.
 ========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.


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

>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
>
>
>


Report this thread to moderator Post Follow-up to this message
Old Post
Steven Cheng [MSFT]
04-16-08 09:40 AM


Re: ASP.NET 3.5 AJAX and default error handler
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 wrote:
> 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 i
n
> client side with a popup that reports the error message.
>
> thanks

Report this thread to moderator Post Follow-up to this message
Old Post
wisccal@googlemail.com
04-16-08 09:40 AM


Re: ASP.NET 3.5 AJAX and default error handler
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


<wisccal@googlemail.com> wrote in message
news:cacffc84-c773-4fa8-af3a-28055a94f3a5@e67g2000hsa.googlegroups.com...
> 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 wrote: 



Report this thread to moderator Post Follow-up to this message
Old Post
Trapulo
04-18-08 01:32 PM


Re: ASP.NET 3.5 AJAX and default error handler
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]" <stcheng@online.microsoft.com> wrote in message
news:TzH2rm4nIHA.8872@TK2MSFTNGHUB02.phx.gbl...
> 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-t...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:
> msdnmg@microsoft.com.
>
>  ========================================
==========
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscript...t/default.aspx.
>  ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
> -------------------- 
> 
> in 
>



Report this thread to moderator Post Follow-up to this message
Old Post
Trapulo
04-18-08 01:32 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP .NET archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:29 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.