简体   繁体   中英

Consuming WCF Service in MVC 4

I have created a WCF Service which I'm consuming in MVC3 application. Now I have a new project of MVC4 in which I want to consume the same service, but I'm not getting the Service class for creating the object.

ServiceReference1.Service1Client obj = new ServiceReference1.Service1Client();

This line is giving me error. My MVC4 project is completely new with Empty template in which I have added a controller and trying to access the service class in it.

Try this.

http://www.naveenbhat.in/2013/07/mvc-4-wcf-add-service-reference.html

Hope this helps.

Seems some update is missing with the VS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM