title: 500 (Internal Server Error) with WebService through AutoComplete JQuery
body: <p>I am working with a simple autocomplete function with Jquery.</p>
  
  <p>Here is the Java Script Code</p>
  
  <pre><code>    $(document).ready(function () {
          $("#AutoCompleteText").autocomplete({
              source: function (request, response) {
                  $.ajax({
                      type: "POST",
                      contentType: "application/json; charset=utf-8",
                      url: "/Service/AutoHelp.asmx/CustomerList",
                      dataType: "json",
                      data: "{}",
                      success: function (data) {
                          response($.map(data.d, function (item) {
                              return {
                                  label: item.TEXT + '(' + item.ID + ')',
                                  value: item.ID,
                                  name: item.TEXT
                              }
                          }))
                      },
                      error: function (XMLHttpRequest, textStatus, errorThrown) {
                          console.log("In The ERROR");
                          console.log(XMLHttpRequest);
                          console.log(textStatus);
                          console.log(errorThrown);
                      }
                  });
              },
              minLength: 1
          });
      });
  </code></pre>
  
  <p>Here is the Web Service Code</p>
  
  <pre><code>Imports System.Web.Services
  Imports System.Web.Services.Protocols
  Imports System.ComponentModel
  Imports System.Web.Script.Services
  
  ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
  ' &lt;System.Web.Script.Services.ScriptService()&gt; _
  &lt;System.Web.Services.WebService(Namespace:="http://tempuri.org/")&gt; _
  &lt;System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)&gt; _
  &lt;ToolboxItem(False)&gt; _
  Public Class AutoHelp
      Inherits System.Web.Services.WebService
  
      &lt;WebMethod()&gt; _
      Public Function HelloWorld() As String
          Return "Hello World"
      End Function
  
      Public Class dbHelpData
          Dim _id As String
          Dim _text As String
  
          Public Property ID As String
              Get
                  Return _id
              End Get
              Set(ByVal value As String)
                  _id = value
              End Set
          End Property
  
          Public Property TEXT As String
              Get
                  Return _text
              End Get
              Set(ByVal value As String)
                  _text = value
              End Set
          End Property
  
      End Class
  
      &lt;WebMethod()&gt; _
      &lt;ScriptMethod(ResponseFormat:=ResponseFormat.Json)&gt; _
      Public Function CustomerList() As List(Of dbHelpData)
          Dim CustList As New List(Of dbHelpData)
  
          Dim mCustList As dbHelpData
          mCustList = New dbHelpData
          mCustList.ID = "1"
          mCustList.TEXT = "Kartik"
          CustList.Add(mCustList)
  
          mCustList = New dbHelpData
          mCustList.ID = "2"
          mCustList.TEXT = "Sarika"
          CustList.Add(mCustList)
  
          mCustList = New dbHelpData
          mCustList.ID = "3"
          mCustList.TEXT = "Yashika"
          CustList.Add(mCustList)
  
          Return CustList
      End Function
  
  End Class
  </code></pre>
  
  <p>When I am trying to execute AutoFill it's giving me an error as 
  POST <a href="http://ab99.pricecompareindia.com/Service/AutoHelp.asmx/CustomerList" rel="nofollow">http://ab99.pricecompareindia.com/Service/AutoHelp.asmx/CustomerList</a> 500 (Internal Server Error) 
  But I tried to execute service directly from the browser and it's giving me an XML output view as below.</p>
  
  <pre><code>&lt;ArrayOfDbHelpData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/"&gt;
      &lt;dbHelpData&gt;
          &lt;ID&gt;1&lt;/ID&gt;
          &lt;TEXT&gt;Kartik&lt;/TEXT&gt;
      &lt;/dbHelpData&gt;
      &lt;dbHelpData&gt;
          &lt;ID&gt;2&lt;/ID&gt;
          &lt;TEXT&gt;Sarika&lt;/TEXT&gt;
      &lt;/dbHelpData&gt;
      &lt;dbHelpData&gt;
          &lt;ID&gt;3&lt;/ID&gt;
          &lt;TEXT&gt;Yashika&lt;/TEXT&gt;
      &lt;/dbHelpData&gt;
  &lt;/ArrayOfDbHelpData&gt;
  </code></pre>
  
  <p>It's hard to figureout for me what I am doing wrong. A complete code is running at <a href="http://ab99.pricecompareindia.com/" rel="nofollow">http://ab99.pricecompareindia.com/</a></p>
  
  <p>Can anyone please help me.
  Thanks in Advance.</p>