title: Javascript Error thrown by AjaxToolKit in .NET only on some machines
body: <p>We have a button that saves asynchronously using AjaxToolKit/C#/.NET.  I'm getting this in my Error Console:</p>
  
  <pre><code>Error: [Exception... "'Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException:
  An unknown error occurred while processing the request on the server. The status code returned from the server was: 500' when calling method:
  [nsIDOMEventListener::handleEvent]"  nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)"  location: "&lt;unknown&gt;"  data: no]
  </code></pre>
  
  <p>The strangest thing about this is that it's only happening on some machines (but not all).  Everyone in the office checked this out in FF 3.0.4 and IE 7, and the save works fine for most people.  For the handful of people that it doesn't work for, it fails in both browsers.</p>
  
  <p>Any ideas of where to start troubleshooting this?</p>
  
  <ol>
  <li>I'd say it was a server/code error,
  but it works for most people.</li>
  <li>I'd say it was a javascript error, but
  we're all using the same browser.</li>
  <li>I might even say it was an OS
  difference, but it happens to both
  XP and Vista users.</li>
  <li>User Permissions are the same for all of us</li>
  </ol>
  
  <p>The application was working correctly until this weekend's update, where we updated a UserControl on the page.  If I remove that control, the save works fine on all computers.  When I add the control, we have the above situation where it fails on random computers.</p>
  
  <p><strong>Answer</strong></p>
  
  <p>Unfortunately, this was hard to track down due to the mysteriousness of how AjaxToolKit returns errors.  The real culprit was that there was HTML in some of our fields in the UserControl.  We added ValidateRequest="false" to the top of our page, and our problems disappeared.</p>
  
  <p>The way we ultimately found the problem was to <strong>remove the UpdatePanel</strong> from around our Save button.</p>
  
  <p>Sorry I didn't think of this sooner, because it was pretty straightforward from there.  I'm giving Michael the accepted answer for his hard work and exhaustive troubleshooting list.</p>