This post is aimed at providing a good way to version web services. Note that there are many ways to do this, and this is just one way.
When versioning a service, it’s important to be able to run multiple versions side by side. When you upgrade the web service for one client, you can’t immediately take away the current version from existing clients. Existing clients will move to the new version if/when they can/want to.
The identifier for the web service is the Url, so the version number must be embedded in the url.
Here is one way to do it:
When you want to modify the web service, do so, but deploy it side-by-side with the current version:
With this versioning strategy, you will be able to publish upgraded web services while maintaining service to existing customers. Down the road, when you have confirmed that all customers of the v1.0 service have moved to the v1.5 service, you can discontinue the v1.0 version.
I’ve learned that if there are urls with dots (.) in the path, then the IIS lockdown tool won’t work with them. For that reason, it’s probably good to use (_) instead of (.) for the version delimiter. I also agree with the first commenter that major and minor versions are enough.
There are plenty of folks talking about web service versioning: