Question

I have two services one ASMX and one WCF service hosted.

And they are added as "Web Reference" to a project.

My question is, when should I update the reference in the project.

Is it only when I add/edit a Web method / Contract to the service.

Or Do we need to update it even if some code level change is done?

Was it helpful?

Solution

A web reference includes the web service's address and signature (name of functions and arguments). If these do not change, then you don't have to update the web reference.

So, if only the source of a function is changed but it's signature remains the same, you do not have to change the web reference.

Hope I helped!

OTHER TIPS

you might need to update a Web reference when new methods are added to an existing XML Web service. In that case, you need to generate a new proxy for the Web service so you can access the new method; this happens automatically when you update the Web reference.

To update a project Web reference

  • In Solution Explorer, open your project's App_WebReferences folder and click the node for the Web reference you want to update.
  • Right-click the reference and click Update Web Reference.

  • The new files for the XML Web service are downloaded to your project. Information for the XML Web service is updated within your project

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top