title: WCF Versioning : Update Attribute Namespaces and Support Previous Namespaces
body: <p>I have three WCF services (.svc) which generate .wsdl references for SOAP messages.</p>
  
  <p>Given that part of the namespace needs to change for all ServiceContract, OperationContract, DataContract attributes, for example </p>
  
  <pre><code>[DataContract(Namespace = "http://old.com.au/types/")]
  </code></pre>
  
  <p>to</p>
  
  <pre><code>[DataContract(Namespace = "http://new.com.au/types/")]
  </code></pre>
  
  <p><strong>How is it that I can still support clients which have the old service reference (without them needing to update, because maybe they wont have time to update immediately) and allow clients getting a new service reference to get the new namespace?</strong>  <em>None of the service is changing, just the namespace.</em></p>
  
  <p>So far I have read a lot of stuff but the following article suggests it is possible to change the service type from the ServiceHostFactory : <a href="http://blog.ranamauro.com/2008/07/hosting-wcf-service-on-iis-site-with_25.html" rel="nofollow noreferrer">http://blog.ranamauro.com/2008/07/hosting-wcf-service-on-iis-site-with_25.html</a></p>
  
  <p>Which would mean creating two of every contract (putting as much of the implementation as possible in one place), and figuring out at runtime which serivce type to use.  This would create some mess in my scenario.</p>
  
  <p><strong>Q. Is there an alternative, nice way to accomplish this or is it expected that this kind of thing should not be done and the client made to update to the new namespace.</strong></p>
  
  <p>(If there is a namespace mismatch from the client I get the error : The message with Action "..." cannot be processed at the receiver, due to a ContractFilter mismatch)</p>