title: Json ajax call returning response 200 ok
body: <p>Here is my code </p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;script type="text/javascript" src="&lt;%= ResolveUrl("Scripts/jquery-1.3.2.min.js") %&gt;"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;div&gt;
      &lt;input type="button" id="btn" value= "call web service" onclick="callwebservice()" /&gt;
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  &lt;script type="text/javascript" language="javascript"&gt;
  function AjaxFailed(result) {
              alert('call stastus:' + result.status + ' ' + result.statusText);
              alert('responsetest"'+result.responseText);
              alert('errorthrown' + result.errorThrown);
  
          }
          function callwebservice() {
              $.ajax(
                      {
                          type: "POST",
                          url: "default.aspx/LoginFromFacebook",
                          data: "",
                          contentType: "application/json; charset=utf-8",
                          dataType: "json",
                          success: function(response) {
                              alert(response);
                          },
                          error: AjaxFailed
                      }
                     );
          }
  &lt;/script&gt;
  
  code behind -----------------
  
  [WebMethod()]
      public static string LoginFromFacebook()
      {
          return "helloworld";
      }
  </code></pre>
  
  <hr>
  
  <p>This is very simple code I have only one web method in my default.aspx file  when i am calling the webmethod  I am getting response code 200 ok.
  I investigated using fiddler 
  response is as below
      HTTP/1.1 200 OK
      Cache-Control: private
      Content-Type: text/html; charset=utf-8
     Server: Microsoft-IIS/7.5
     X-AspNet-Version: 2.0.50727
     X-Powered-By: ASP.NET
    Date: Mon, 15 Aug 2011 09:16:21 GMT
    Content-Length: 1535</p>
  
  <p>don't know why this is happening. I am expecting only string as response where i am getting whole page's html  as response.</p>