title: HTTP 500 Error jQuery Ajax with Web service
body: <p>I have two simple projects in a single Visual Studio solution to understand how a jQuery ajax request works. One is a web service and the second one is a project consuming the web service. </p>
  
  <p>You can download the very small project from here. <strong><a href="https://www.dropbox.com/s/i4g7u891lyc0ayx/ExampleJsonApp.zip" rel="nofollow noreferrer">Download Project file</a></strong></p>
  
  <p>As you can see in the project, Whenever I try to call the Web Service, Internal Server Error 500 is occurring.</p>
  
  <p>In chrome, I can see the following alert (executed by "Error" function of Ajax call)</p>
  
  <p><img src="https://i.stack.imgur.com/oy4VR.png" alt="enter image description here"></p>
  
  <p>Please assist me to find the problem..</p>
  
  <p>EDIT:</p>
  
  <pre><code>function btnClick() {
          debugger;
          var txtValue = $('#txtValue');
          var text = txtValue.val();
          //
          //
          $.ajax({
              url: "http://localhost:12000/ExampleJsonWS.asmx/getValue",
              type: "POST",
              dataType: "json",
              data: "{" + txtValue.val() + "}",
              timeout: 30000,
              async: false,
              contentType: "application/json; charset=utf-8",
              success: function (data) {
                  debugger;
                  alert(data);
                  return data;
              },
              error: function (result) {
                  debugger;
                  //alert(e);
                  alert(result.status + ' ' + result.statusText);
              }
          });
      }
  </code></pre>