<?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/2007/07/18/how-to-improve-aspnet-ajax-error-handling/feed/" rel="self" type="application/rss+xml" />
	<link>http://encosia.com/2007/07/18/how-to-improve-aspnet-ajax-error-handling/</link>
	<description>ASP.NET and AJAX code, ideas, and examples.</description>
	<lastBuildDate>Thu, 11 Mar 2010 18:05:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Update panel case study &#124; Private: My Note</title>
		<link>http://encosia.com/2007/07/18/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/2007/07/18/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/2007/07/18/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/2007/07/18/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/2007/07/18/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/2007/07/18/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/2007/07/18/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/2007/07/18/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/2007/07/18/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/2007/07/18/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>
	<item>
		<title>By: ASP.NET Error Handling Resources - C#</title>
		<link>http://encosia.com/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-34604</link>
		<dc:creator>ASP.NET Error Handling Resources - C#</dc:creator>
		<pubDate>Tue, 24 Mar 2009 07:32:16 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-34604</guid>
		<description>[...] 5) How to improve ASP.NET AJAX error handling [...]</description>
		<content:encoded><![CDATA[<p>[...] 5) How to improve ASP.NET AJAX error handling [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://encosia.com/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-34546</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Wed, 18 Mar 2009 20:45:29 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-34546</guid>
		<description>Great work!  Thanks a lot!</description>
		<content:encoded><![CDATA[<p>Great work!  Thanks a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony Walsh</title>
		<link>http://encosia.com/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-32472</link>
		<dc:creator>Anthony Walsh</dc:creator>
		<pubDate>Tue, 14 Oct 2008 01:21:54 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-32472</guid>
		<description>Great work thanks a lot!

Also check this page out:

   &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb398934.aspx&quot; rel=&quot;nofollow&quot;&gt;Customizing Error Handling for ASP.NET UpdatePanel Controls&lt;/a&gt;

...it demonstrates both methods, the &#039;modal alert box&#039; method and the &#039;div&#039; method.


Regards,
Anthony Walsh.</description>
		<content:encoded><![CDATA[<p>Great work thanks a lot!</p>
<p>Also check this page out:</p>
<p>   <a href="http://msdn.microsoft.com/en-us/library/bb398934.aspx" rel="nofollow">Customizing Error Handling for ASP.NET UpdatePanel Controls</a></p>
<p>&#8230;it demonstrates both methods, the &#8216;modal alert box&#8217; method and the &#8216;div&#8217; method.</p>
<p>Regards,<br />
Anthony Walsh.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: makhina kryo</title>
		<link>http://encosia.com/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-31886</link>
		<dc:creator>makhina kryo</dc:creator>
		<pubDate>Wed, 13 Aug 2008 20:26:40 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-31886</guid>
		<description>Thousands thanks!!! 
I use master pages and AJAX. I have been fighting against this AJAX silence upon postback errors for hours and hours! Now AJAX errors have colors and texts. Thanks to you! I use your code as followed ...

&lt;pre lang=&quot;javascript&quot;&gt;  // If there is, show the custom error.
  //Show the custom message ...
  var errorMessage = args.get_error().message;
  var divError = $get(&#039;Error&#039;);
  divError.style.visibility = &quot;visible&quot;;
  divError.innerHTML = errorMessage + &quot;&quot; + &quot;&quot;;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Thousands thanks!!!<br />
I use master pages and AJAX. I have been fighting against this AJAX silence upon postback errors for hours and hours! Now AJAX errors have colors and texts. Thanks to you! I use your code as followed &#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">  <span style="color: #006600; font-style: italic;">// If there is, show the custom error.</span>
  <span style="color: #006600; font-style: italic;">//Show the custom message ...</span>
  <span style="color: #003366; font-weight: bold;">var</span> errorMessage <span style="color: #339933;">=</span> args.<span style="color: #660066;">get_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">message</span><span style="color: #339933;">;</span>
  <span style="color: #003366; font-weight: bold;">var</span> divError <span style="color: #339933;">=</span> $get<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Error'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  divError.<span style="color: #660066;">style</span>.<span style="color: #660066;">visibility</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;visible&quot;</span><span style="color: #339933;">;</span>
  divError.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> errorMessage <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&quot;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://encosia.com/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-31533</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 14 Jul 2008 22:50:18 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/index.php/2007/07/18/how-to-improve-aspnet-ajax-error-handling/#comment-31533</guid>
		<description>Try running your program not in Debug mode (ctrl + F5)</description>
		<content:encoded><![CDATA[<p>Try running your program not in Debug mode (ctrl + F5)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
