Error on $.ajax: 500 internal server

Error on $.ajax: 500 internal server

I don't know what is wrong in my code here, but I receive this error. 

  1. Request URL:
  2. Request Method:
    POST
  3. Status Code:
    500 Internal Server Error



My code:
  1.            $("#_butt").click(function () {
  2.                 //alert($("input:text").length);
  3.                 $('#table input[type="text"]').each(function () {
  4.                     $.ajax({
  5.                         type: "POST",
  6.                         url: "WebService.asmx/gotodb",
  7.                         data: "{str1:'" + $(this).val() + "'}",
  8.                         contentType: "application/json; charset=utf-8",
  9.                         dataType: "json",
  10.                         success: function (msg) {
  11.                             alert(msg.d);
  12.                         }
  13.                     });
  14.                 });
  15.             });

Services.cs
  1.     [WebMethod]
  2.     public string gotodb(string str1)
  3.     {
  4.         return "just a test";
  5.     }
I need to use the web-service to add values of the text boxes into my database.

Thanks. I forgot to uncomment a line!