<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to improve ASP.NET AJAX error handling</title>
	<atom:link href="http://encosia.com/how-to-improve-aspnet-ajax-error-handling/feed/" rel="self" type="application/rss+xml" />
	<link>http://encosia.com/how-to-improve-aspnet-ajax-error-handling/</link>
	<description>ASP.NET and AJAX code, ideas, and examples.</description>
	<lastBuildDate>Thu, 02 Feb 2012 19:50:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: trickster</title>
		<link>http://encosia.com/how-to-improve-aspnet-ajax-error-handling/#comment-42894</link>
		<dc:creator>trickster</dc:creator>
		<pubDate>Tue, 05 Apr 2011 00:57:10 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-42894</guid>
		<description>how can I use an event handler to delay access on the PageRequestManager?</description>
		<content:encoded><![CDATA[<p>how can I use an event handler to delay access on the PageRequestManager?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karim</title>
		<link>http://encosia.com/how-to-improve-aspnet-ajax-error-handling/#comment-39880</link>
		<dc:creator>Karim</dc:creator>
		<pubDate>Mon, 20 Sep 2010 11:06:34 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-39880</guid>
		<description>Testing for &#039;undefined&#039; feels wrong here, as args.get_error() returns &#039;null&#039; if there is no error (on my system anyway: ASP.NET 3.5 SP1). What&#039;s wrong with the following test?
&lt;pre lang=&quot;javascript&quot;&gt;
...
if (args.get_error() !== null)
...
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Testing for &#8216;undefined&#8217; feels wrong here, as args.get_error() returns &#8216;null&#8217; if there is no error (on my system anyway: ASP.NET 3.5 SP1). What&#8217;s wrong with the following test?</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">...
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>args.<span style="color: #660066;">get_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span>
...</pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff BBQ</title>
		<link>http://encosia.com/how-to-improve-aspnet-ajax-error-handling/#comment-39108</link>
		<dc:creator>Jeff BBQ</dc:creator>
		<pubDate>Wed, 09 Jun 2010 19:31:46 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-39108</guid>
		<description>I fought this problem for two days, until I found your post. You Rock!!! Thanks!</description>
		<content:encoded><![CDATA[<p>I fought this problem for two days, until I found your post. You Rock!!! Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barnabas Arul</title>
		<link>http://encosia.com/how-to-improve-aspnet-ajax-error-handling/#comment-38883</link>
		<dc:creator>Barnabas Arul</dc:creator>
		<pubDate>Wed, 02 Jun 2010 11:28:54 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-38883</guid>
		<description>Hi ,
I have already used the 
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequest);
for different purpose at pagelevel i.e. for loading and closing progress bar.But now i got the new requirement.I need to hide All types of Ajax Errors and make the sesssion out.So if iam using the same above event,getting conflict.Is there any alternative to hide all the ajax errors.Its an urgent issue.Please help me as early as possible</description>
		<content:encoded><![CDATA[<p>Hi ,<br />
I have already used the<br />
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequest);<br />
for different purpose at pagelevel i.e. for loading and closing progress bar.But now i got the new requirement.I need to hide All types of Ajax Errors and make the sesssion out.So if iam using the same above event,getting conflict.Is there any alternative to hide all the ajax errors.Its an urgent issue.Please help me as early as possible</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ruurtjan Pul</title>
		<link>http://encosia.com/how-to-improve-aspnet-ajax-error-handling/#comment-38571</link>
		<dc:creator>Ruurtjan Pul</dc:creator>
		<pubDate>Tue, 27 Apr 2010 12:32:50 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-38571</guid>
		<description>The easy way:
&lt;pre lang=&quot;javascript&quot;&gt;
Namespace.webserviceClassName._staticInstance._failed = function( error ) {
    ...
});
&lt;/pre&gt;
where error is an object containing:
&lt;pre lang=&quot;javascript&quot;&gt;
var error = {
_exceptionType: string, 
_message: string, 
_stackTrace: string, 
_statusCode: int, 
_timedOut: bool
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>The easy way:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">Namespace</span>.<span style="color: #660066;">webserviceClassName</span>._staticInstance._failed <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> error <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    ...
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>where error is an object containing:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> error <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
_exceptionType<span style="color: #339933;">:</span> string<span style="color: #339933;">,</span> 
_message<span style="color: #339933;">:</span> string<span style="color: #339933;">,</span> 
_stackTrace<span style="color: #339933;">:</span> string<span style="color: #339933;">,</span> 
_statusCode<span style="color: #339933;">:</span> int<span style="color: #339933;">,</span> 
_timedOut<span style="color: #339933;">:</span> bool</pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Update panel case study &#124; Private: My Note</title>
		<link>http://encosia.com/how-to-improve-aspnet-ajax-error-handling/#comment-36899</link>
		<dc:creator>Update panel case study &#124; Private: My Note</dc:creator>
		<pubDate>Sun, 25 Oct 2009 18:14:03 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-36899</guid>
		<description>[...] http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/" rel="nofollow">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Meltac</title>
		<link>http://encosia.com/how-to-improve-aspnet-ajax-error-handling/#comment-36696</link>
		<dc:creator>Meltac</dc:creator>
		<pubDate>Fri, 09 Oct 2009 17:37:46 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-36696</guid>
		<description>Thanks again, I will consider that.</description>
		<content:encoded><![CDATA[<p>Thanks again, I will consider that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/how-to-improve-aspnet-ajax-error-handling/#comment-36692</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Fri, 09 Oct 2009 16:26:09 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-36692</guid>
		<description>As far as I know, there&#039;s no detriment to setting it as high as you need.  If you&#039;re sending more than the default, you may want to consider breaking your data into pages or otherwise partitioning it though.  It&#039;s a good sign you may be dealing with too much data at once.</description>
		<content:encoded><![CDATA[<p>As far as I know, there&#8217;s no detriment to setting it as high as you need.  If you&#8217;re sending more than the default, you may want to consider breaking your data into pages or otherwise partitioning it though.  It&#8217;s a good sign you may be dealing with too much data at once.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Meltac</title>
		<link>http://encosia.com/how-to-improve-aspnet-ajax-error-handling/#comment-36682</link>
		<dc:creator>Meltac</dc:creator>
		<pubDate>Fri, 09 Oct 2009 10:00:35 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-36682</guid>
		<description>Thanks Dave, that didn&#039;t do the trick, but it leaded me the way to solve another error in our app...

Btw, are there any best practices or recommendations on how large to set the maxJsonLength?</description>
		<content:encoded><![CDATA[<p>Thanks Dave, that didn&#8217;t do the trick, but it leaded me the way to solve another error in our app&#8230;</p>
<p>Btw, are there any best practices or recommendations on how large to set the maxJsonLength?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/how-to-improve-aspnet-ajax-error-handling/#comment-36680</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Fri, 09 Oct 2009 03:10:58 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-36680</guid>
		<description>You may need to adjust maxJsonLength upward.  See here for more info:  http://msdn.microsoft.com/en-us/library/bb763183.aspx</description>
		<content:encoded><![CDATA[<p>You may need to adjust maxJsonLength upward.  See here for more info:  <a href="http://msdn.microsoft.com/en-us/library/bb763183.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/bb763183.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Meltac</title>
		<link>http://encosia.com/how-to-improve-aspnet-ajax-error-handling/#comment-36663</link>
		<dc:creator>Meltac</dc:creator>
		<pubDate>Thu, 08 Oct 2009 07:08:50 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-36663</guid>
		<description>Under some (my) conditions, when using args.get_error(), the error message is being cut due to some &quot;undocumented&quot; length limitations.

Any ideas how to increase the max message length of the AJAX error?</description>
		<content:encoded><![CDATA[<p>Under some (my) conditions, when using args.get_error(), the error message is being cut due to some &#8220;undocumented&#8221; length limitations.</p>
<p>Any ideas how to increase the max message length of the AJAX error?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Another John</title>
		<link>http://encosia.com/how-to-improve-aspnet-ajax-error-handling/#comment-36581</link>
		<dc:creator>Another John</dc:creator>
		<pubDate>Wed, 30 Sep 2009 19:20:13 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-36581</guid>
		<description>This is nice code and was fairly easy to adapt for use to masterpages, ajax, and Telerik controls.  I used Telerik&#039;s RadWindow alert box as the modal dialog - worked really slick.  This good example saved me a few steps today.

John</description>
		<content:encoded><![CDATA[<p>This is nice code and was fairly easy to adapt for use to masterpages, ajax, and Telerik controls.  I used Telerik&#8217;s RadWindow alert box as the modal dialog &#8211; worked really slick.  This good example saved me a few steps today.</p>
<p>John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/how-to-improve-aspnet-ajax-error-handling/#comment-36431</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Sat, 12 Sep 2009 21:43:01 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-36431</guid>
		<description>That&#039;s probably due to the rendered ClientIDs being changed in the Master/Content scenario.  In my specific example, it shouldn&#039;t matter since the div isn&#039;t runat=&quot;server&quot;, but your situation may be impacted.

Try replacing any $get(&#039;ID&#039;) with $get(&#039;&lt;%= ID.ClientID %&gt;&#039;) to make sure your JavaScript is referencing the correct element.</description>
		<content:encoded><![CDATA[<p>That&#8217;s probably due to the rendered ClientIDs being changed in the Master/Content scenario.  In my specific example, it shouldn&#8217;t matter since the div isn&#8217;t runat=&#8221;server&#8221;, but your situation may be impacted.</p>
<p>Try replacing any $get(&#8216;ID&#8217;) with $get(&#8216;< %= ID.ClientID %>&#8216;) to make sure your JavaScript is referencing the correct element.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mattias</title>
		<link>http://encosia.com/how-to-improve-aspnet-ajax-error-handling/#comment-36421</link>
		<dc:creator>Mattias</dc:creator>
		<pubDate>Fri, 11 Sep 2009 08:36:13 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-36421</guid>
		<description>Im trying to get this to work with a masterpage.
I have a updatepanel on a content page and if I remove the updatepanel it works.

How do I solve this ?</description>
		<content:encoded><![CDATA[<p>Im trying to get this to work with a masterpage.<br />
I have a updatepanel on a content page and if I remove the updatepanel it works.</p>
<p>How do I solve this ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hani</title>
		<link>http://encosia.com/how-to-improve-aspnet-ajax-error-handling/#comment-36379</link>
		<dc:creator>Hani</dc:creator>
		<pubDate>Tue, 01 Sep 2009 15:54:20 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-36379</guid>
		<description>Hello,

Kindly note that i am using the APPLICATION ERRO function to catch all unhandled errors. what is happening is that AJAX errors are now handled by the Application_Error.

Please advise how to handle AJAX errors alone.


    Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
        Dim vLastError As New Exception
        vLastError = Server.GetLastError().GetBaseException()

        If vLastError Is Nothing Then
            Application(&quot;GLOBAL_ErrorMessage&quot;) = &quot;No Errors&quot;
        Else
            Application(&quot;GLOBAL_ErrorMessage&quot;) = vLastError.Message
        End If

        Server.ClearError()
        Response.Redirect(&quot;~/errors.aspx&quot;)
        &#039;Server.Transfer(&quot;~/errors.aspx&quot;)
    End Sub</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Kindly note that i am using the APPLICATION ERRO function to catch all unhandled errors. what is happening is that AJAX errors are now handled by the Application_Error.</p>
<p>Please advise how to handle AJAX errors alone.</p>
<p>    Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)<br />
        Dim vLastError As New Exception<br />
        vLastError = Server.GetLastError().GetBaseException()</p>
<p>        If vLastError Is Nothing Then<br />
            Application(&#8220;GLOBAL_ErrorMessage&#8221;) = &#8220;No Errors&#8221;<br />
        Else<br />
            Application(&#8220;GLOBAL_ErrorMessage&#8221;) = vLastError.Message<br />
        End If</p>
<p>        Server.ClearError()<br />
        Response.Redirect(&#8220;~/errors.aspx&#8221;)<br />
        &#8216;Server.Transfer(&#8220;~/errors.aspx&#8221;)<br />
    End Sub</p>
]]></content:encoded>
	</item>
</channel>
</rss>

