Answered by:
multiple functions with get request in web-api issue.

Question
-
User-1720943447 posted
Hello,
i am new to asp.net web api-
I am calling webapi methods from asp.net forms website.
i need to call 2 different methods by ajax request.
It is showing me "Multiple actions were found that match the request:" error
I have made following settings in global.asax---
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startupSystem.Web.Routing.RouteTable.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{action}/{id}",
defaults: new { id = System.Web.Http.RouteParameter.Optional }
);
System.Web.Routing.RouteTable.Routes.MapHttpRoute(
name: "DefaultApi1",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = System.Web.Http.RouteParameter.Optional }
);
}how to implement this.
-satyajeet
Friday, March 8, 2013 2:17 AM
Answers
-
User220959680 posted
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, March 8, 2013 5:29 AM -
User-1000095884 posted
Hi,
Thanks for your post.
For issues on Web API, suggest you post the question here, there are more professionals on this issue, so you can get better support. Thanks for your understanding.
Best Regards.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, March 11, 2013 5:08 AM
All replies
-
User220959680 posted
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, March 8, 2013 5:29 AM -
User-1000095884 posted
Hi,
Thanks for your post.
For issues on Web API, suggest you post the question here, there are more professionals on this issue, so you can get better support. Thanks for your understanding.
Best Regards.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, March 11, 2013 5:08 AM