title: receiving error (internal server error) when sending Ajax request on Asp.NET Web Forms Endpoint
body: <p>I am sending ajax request in asp.net i get this error</p>
  
  <blockquote>
    <p>POST <a href="http://localhost:1549/AdminArea/Roles.aspx/Create" rel="nofollow noreferrer">http://localhost:1549/AdminArea/Roles.aspx/Create</a> 500 (Internal
    Server Error)</p>
  </blockquote>
  
  <p>it is with Master Page Also shown code is in individual page  <code>Roles.aspx</code>
  my HTML Code</p>
  
  <pre><code>&lt;form  id="FormSave"&gt;      
    &lt;input type="text" name="txtName" id="txtName" required="required" 
                  class="form-control"/&gt;                                      
   &lt;input type="radio" name="Status" value="1" checked="checked"/&gt; Active
   &lt;input type="radio" name="Status" value="0"/&gt; In-active
   &lt;/form&gt;
  </code></pre>
  
  <p>Javascript Code For Sending Request </p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
          $(document).ready(function () {
              $("#BtnSave").click(function () {
                  var jsonText = JSON.stringify({ Name: $("txtName").val(), Status: $("Status").val() });
                  $.ajax({
                      type: "POST",
                      url: "Roles.aspx/Create",
                      contentType: "application/json; charset=utf-8",
                      data: jsonText,
                      dataType: "json",
                      success: function (response) {
                          alert(response);
                      }
                  });
              });    
    });
    &lt;/script&gt;
  </code></pre>
  
  <p>SERVER SIDE C# SCRIPT /// IN Roles.aspx.cs file </p>
  
  <pre><code>[WebMethod]
  public static string Create(string Name, string Status)
  {
          return "Hello " + Name + "With " + Status;
  }
  </code></pre>
  
  <p>I want to alert this Hello Name  With Status</p>