How to publish a web service in ASP.Net?

Below url is the web service I hosted: http://monocept.net/vlt/html/AutoComplete.asmx

when I call this service, it calls the GetCompleteList () web method. This method implementation is defined in the AutoComplete.asmx.cs file. When I call this service, it throws an exception like HTTP 404, where, like in my local service, it works fine and can get into the GetCompleteList () method on the Internet.

+3
source share
3 answers

The error page actually dumps the exception / stack trace in the HTML comment:

[HttpException]: The controller for path '/vlt/html/AutoComplete.asmx/GetCompleteList' was not found or does not implement IController.
   at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType)
   at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName)
   at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory)
   at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
   at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state)
   at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

I am not familiar with MVC, so I really cannot give you a solid answer, but investigating this exception raises several results .

0

. MVC. -.

0

global.asax?

routes.IgnoreRoute("{resource}.asmx/{*pathInfo}");
0

Source: https://habr.com/ru/post/1789233/


All Articles