title: Simple AJAX not working
body: <p>I have this AJAX code, but it doesn't seem to throw the 'alert' method. Instead, nothing happens. I looked at it with Fiddler and got this error message:
  <code>{"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""}</code></p>
  
  <p>I'm trying to call a web method in the code-behind called <code>MyWebMethod</code>:</p>
  
  <pre><code> $.ajax({   type: "POST",
              url: "Test.aspx/MyWebMethod",
              data: "{" + username + "}",
              contentType: "application/json; charset=utf-8",
              dataType: "json",
  
              success: function() {
                  alert("success");
              },
  
              fail: function() {
                  alert("Fail");
              }
   });
  </code></pre>
  
  <p>The web method worked fine when I had a script manager on the page, but I want to remove the script manager and thought that using AJAX would be the best way.</p>
  
  <p>Thanks</p>