I have an Asp.net Mvc3 project and I have made a ApiController in it. Now I want to call the api in a windows application project. And I dont know how to config Global.asax or web.config file to approach this. And I dont know what would be the service reference url(If the ApiController name is Service and the method in it is UpdatePrice)?
Asked
Active
Viewed 5,232 times
0
-
you have to call it with url: yourDomain.com/Service/UpdatePrice – Marian Ban Oct 15 '14 at 06:34
-
You mean I should make a http wen request to do this? I want to use it like a web api service. – Hamid Reza Oct 15 '14 at 06:36
-
2yes make a http request. web api is just a rest service which should be accessed over http. – Marian Ban Oct 15 '14 at 06:37
1 Answers
1
You have to make an HTTP request from the application to the WEBAPI action URL you want to access using HttpClient
. WEBAPI is a REST based HTTP service, so you can access it only via HTTP unlike WCF on this context.
You can refer here for more information and code samples on this.

Aneesh Mohan
- 1,077
- 8
- 17