※前提条件:本情報は[Asp.Net MVC 5.0を基づいて説明してる multiple actions were found that match the request †事象 AjaxでWeb APIをアクセスする場合、下記のエラーが発生しました。 multiple actions were found that match the request Route Mapを以下に定義されているので、問題が発生しました。 routes.MapHttpRoute( name: "API Default", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional }); 以下のように、ActionもRoute Mapに明記すれば、問題を解決できる routes.MapHttpRoute( name: "API Default", routeTemplate: "api/{controller}/{action}/{id}", defaults: new { id = RouteParameter.Optional }); フレッツ光が月額556円~【GMOとくとくBB】 コメント: |