buen día
estoy teniendo un problema en organizar mi webapi (mvc), la idea es tener concentrado en carpetas micro-sistemas que se usarán como servicios, la cuestión es que me marca el error:
Código:
Message:An error has occurred.","ExceptionMessage":"Multiple types were found that match the controller named 'login'. This can happen if the route that services this request ('api/resultados/{controller}/{action}') found multiple controllers defined with the same name but differing namespaces, which is not supported.\r\n\r\nThe request for 'login' has found the following matching controllers:\r\nApi.Controllers.Auth.LoginController\r\nApi.Controllers.Users.LoginController
ExceptionType: System.InvalidOperationException","StackTrace":" at System.Web.Http.Dispatcher.DefaultHttpControllerSelector.SelectController(HttpRequestMessage request)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()
así esta mi webapiconfig.cs
Código:
config.Routes.MapHttpRoute(
name: "Api.Auth",
routeTemplate: "api/auth/{controller}/{action}"
);
config.Routes.MapHttpRoute(
name: "Api.Users",
routeTemplate: "api/users/{controller}/{action}"
);
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
Como puedo configurar mi webapi o routes para que puedan funcionar en carpetas?
de antemano, gracias.