Hi all,
I am trying to use the component AutoCompleteBox with a local Webservice. But I got an issue.
So I run Fiddler webdebug, and I can see an error 500, in the detail, I saw:
POST http://localhost:49257/agent/Ws/_WS_SearchCity.asmx/GetCompanyNames HTTP/1.1
Accept: */*
X-Requested-With: XMLHttpRequest
Content-Type: application/json; charset=utf-8
Referer: http://localhost:49257/agent/AcquereurAction.aspx?aID=8&sID=2c0d3ed4-4d34-4ce0-b437-70cf387c56e2
Accept-Language: fr-FR
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)
Host: localhost:49257
Content-Length: 122
DNT: 1
Connection: Keep-Alive
Pragma: no-cache
Cookie: ASP.NET_SessionId=pdwak0ep3ear4yj3nzsvv2ae
{"context":{"Text":"puteaux","MaxResultCount":-1,"IsCaseSensitive":false,"ClientData":"ClientData_Passed_To_The_Service"}}
And the detail is:
Server Error in '/agent' Application.Unknown web method GetCompanyNames.
Parameter name: methodName Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Unknown web method GetCompanyNames.
Parameter name: methodName
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Unknown web method GetCompanyNames.
Parameter name: methodName]
System.Web.Script.Services.WebServiceData.GetMethodData(String methodName) +216
System.Web.Script.Services.RestHandler.CreateHandler(WebServiceData webServiceData, String methodName) +63
System.Web.Script.Services.RestHandler.CreateHandler(HttpContext context) +298
System.Web.Script.Services.RestHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +185
System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +119
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +226
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +145
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
However, my code folow this sample
http://www.telerik.com/help/aspnet-ajax/autocompletebox-databinding-webservice.html
I am trying to use the component AutoCompleteBox with a local Webservice. But I got an issue.
So I run Fiddler webdebug, and I can see an error 500, in the detail, I saw:
POST http://localhost:49257/agent/Ws/_WS_SearchCity.asmx/GetCompanyNames HTTP/1.1
Accept: */*
X-Requested-With: XMLHttpRequest
Content-Type: application/json; charset=utf-8
Referer: http://localhost:49257/agent/AcquereurAction.aspx?aID=8&sID=2c0d3ed4-4d34-4ce0-b437-70cf387c56e2
Accept-Language: fr-FR
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)
Host: localhost:49257
Content-Length: 122
DNT: 1
Connection: Keep-Alive
Pragma: no-cache
Cookie: ASP.NET_SessionId=pdwak0ep3ear4yj3nzsvv2ae
{"context":{"Text":"puteaux","MaxResultCount":-1,"IsCaseSensitive":false,"ClientData":"ClientData_Passed_To_The_Service"}}
And the detail is:
Server Error in '/agent' Application.Unknown web method GetCompanyNames.
Parameter name: methodName Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Unknown web method GetCompanyNames.
Parameter name: methodName
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Unknown web method GetCompanyNames.
Parameter name: methodName]
System.Web.Script.Services.WebServiceData.GetMethodData(String methodName) +216
System.Web.Script.Services.RestHandler.CreateHandler(WebServiceData webServiceData, String methodName) +63
System.Web.Script.Services.RestHandler.CreateHandler(HttpContext context) +298
System.Web.Script.Services.RestHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +185
System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +119
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +226
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +145
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
However, my code folow this sample
http://www.telerik.com/help/aspnet-ajax/autocompletebox-databinding-webservice.html