0

I have created wcf service and added its refernece into web application project.

Have added as below way: 1. generated proxy and config file using - svcutil command and added proxy file into web application project and merged configuraiton file.

Now, I have added some new methodsinto the wcf service , do i have to use - SVCUTIL command on each time or it should work automatically.... for now, i need to generate proxy file each time.. please suggest some best way.

NOTE: service instance available into ASP.NET web applicaiton (client) but unable to get when use client as - MVC applicatoion. please suggest.

Thanks

user3711357
  • 1,425
  • 7
  • 32
  • 54

2 Answers2

0

In the Web Application, open the Service References folder. Right click on the Service you want to update. Select Update.

Erez Robinson
  • 794
  • 4
  • 9
  • did that but, unable to get updated service reference, even method has operatinalcontract atribute as well. When i generate proxy again using svcutil.exe then it works. please suggest what to do. – user3711357 Jun 18 '14 at 12:41
  • This is supposed to work, please make sure that in the App/Web.Config the endpoint points to the url of the updated running WCF host – Erez Robinson Jun 18 '14 at 13:34
  • My client applicaiton as MVC 4 application. if i add refereince into WEB applicaton or console then it works. but not into MVC. please guide. – user3711357 Jun 19 '14 at 06:41
  • Sorry I cannot help, there is no difference in an MVC app, you should have a service reference folder where you can add and update services according to the web.config, Good Luck – Erez Robinson Jun 22 '14 at 10:02
0

Thanks for the response.

I found the answer, when add service reference (for MVC application) >>> click at 'Advance' button >>> uncheck the "reuse object....." option and then add it.

Then, service client reference is available and it works.

Just for KS, sharing you another design issue due to Add Service Reference option at below link: What should keep into this design approach

Thank You

Community
  • 1
  • 1
user3711357
  • 1,425
  • 7
  • 32
  • 54