I am trying to add the path /_vti_bin/Lists.asmx to my ASP.NET MVC 2 web application.
I am registering the route as follows:
routes.IgnoreRoute("{resource}.asmx/{*pathInfo}");
routes.Add(new Route("_vti_bin/Lists.asmx", new ListsHandler()));
where ListHandler is defined as:
public sealed class ListsHandler : IRouteHandler
{
#region IRouteHandler Members
public IHttpHandler GetHttpHandler(RequestContext requestContext)
{
throw new NotImplementedException();
}
#endregion
}
But when I start the MVC application and try to navigate to http://localhost:8888/_vti_bin/Lists.asmx, I get an HTTP 404 error, rather than an exception raised.
Is this even possible in MVC? Do I need to add an Lists.asmx ASPX web service file to my project in a particular place (I cannot create the _vti_bin folder in the Visual Studio project)?
Update: Darin's response enabled http://localhost:8888/_vti_bin/Lists.asmx to work now (the only difference is the order of the route definitions). But now, requesting the 'About' page of the default MVC 2 project site results in a request to http://localhost:8888/_vti_bin/Lists.asmx?action=About&controller=Home, not to the home controller!
Apparently the order in which the routes are defined matters.