New Added function in WCF is not reflecting in web reference

Sometimes when we add new functions in the WCF Service, but these new added functions aren’t reflected any changes in the project web reference, or we can’t access these newly added functions with object created of web service. How to fix this.

First of  all you should confirm your *.svc file and Interface class should be fine like given images.

Your *.svc file should be like below image

svc file with funcitons

Your interface class should be like below image.

interface class of wcf

If things are okay then you have to Run your web service again once you added new functions. Then click on your *.svc file. It will show you something like below given images.

wcf new added function is not reflecting in web referece

Click on these links and then Go to your project. Right Click on the Service References and then click on the Update Service Reference. Now you will able to access the newly added function with the object you created of your web service.

Happy Coding….

Posted by | View Post | View Group