Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

how to consume wcf services (hosted already) in MVC-4 application.
Sample service like: http://services.odata.org/Northwind/Northwind.svc[^]
Posted
Updated 22-Jul-14 0:16am

1 solution

You can add the service reference to your MVC application, eventually it creates the Client in your app. Create the object to the client and you are now ready to consume the service.

Right click on the Reference folder of your solution -> Add Service Reference -> Provide the address ( in your case http://services.odata.org/Northwind/Northwind.svc/[^]) -> Go -> Give the required namespace -> Ok.

Now the service reference is created in your application. You can consume it now.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900