Skip to main content
CSharpUniversity ASP.NET and C# lessons

The search runs entirely in your browser over the published lesson list.

Updating a client when the service changes

When a service changes, a client built against the old version may stop compiling. The fix is to refresh the reference so the client sees the new contract.

What a reference is

When you add a service reference, the editor generates a proxy class from the service description. The client code talks to that proxy, not to the service directly.

After the service changes

  1. Update the reference so the proxy is regenerated from the new description.
  2. Read the changes carefully. A renamed method or a changed return type will need code changes on the client.
  3. Build and test both sides together, because they now share a contract.
Additive changes are gentler. Adding a new method rarely breaks a client. Removing or renaming one usually does. Treat the contract as a promise and change it carefully.

That completes the web services track. The data behind every service comes from a database, so the next track, installing and running SQL Server, covers the engine itself.

New lessons by email

Leave your address and get a short note whenever a fresh lesson is published. No account needed and you can stop at any time.

Thank you. Your address has been noted in this browser session. Connect a mailing service to deliver the notes for real.