I created a service called AccesoData.asmx containing a method called GetTipos. I tested the method and it is retrieving the data as expected
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Imports AjaxControlToolkit
Imports System.Collections.Generic
Imports System.ComponentModel
' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
' <System.Web.Script.Services.ScriptService()> _<System.Web.Services.WebService(Namespace:="http://tempuri.org/")> _<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _<ToolboxItem(False)> _
Public Class AccesoData
Inherits System.Web.Services.WebService<WebMethod()> _
Public Function GetTipos(knownCategoryValues As String) As CascadingDropDownNameValue()
Dim sSQL As String
sSQL = "SELECT DISTINCT Cod_Texto, Cod_Numero "
sSQL = sSQL & " FROM dbo.tblPropiedades INNER JOIN dbo.vwTipoPropiedad ON dbo.tblPropiedades.Pr_Tipo_Id = dbo.vwTipoPropiedad.Cod_Numero"
sSQL = sSQL & " WHERE Pr_Visible = 1 "
sSQL = sSQL & " AND Pr_Em_Id =" & CInt(ConfigurationManager.AppSettings("EmpresaId").ToString)
sSQL = sSQL & " ORDER BY Cod_Texto"
Dim countries As List(Of CascadingDropDownNameValue) = GetData(sSQL)
Return countries.ToArray()
End Function
....I then created in my project a form added a combo
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></cc1:ToolkitScriptManager><table><tr><td style="width: 80px">
Tipo:</td><td><asp:DropDownList ID="ddlTipo" runat="server" Width="150"></asp:DropDownList><cc1:CascadingDropDown ID="cdlTipo" TargetControlID="ddlTipo" PromptText="Select Country"
PromptValue="" ServicePath="AccesoData.asmx" ServiceMethod="GetTipos" runat="server"
Category="Cod_Numero" LoadingText = "Loading..." Enabled="True" /></td></tr></table>But when running the form it doesn't retrieve data. It appears that the service is not found because if I changed the servicepath to an unknown value it has got the same effect, that is error 500