Search code examples
c#asp.netwcfweb-servicesweb-reference

When should we update Web reference in an ASP.Net project


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?


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!