Hi,
The default namespace of data/servce contracts in WCF is "http://tempuri.org/". By setting the ServiceContract.Namespace and ServiceBehavior.Namespace we can get a custom namespace. I do however got some questions on this :
- Do I have to use a
http://namespace or could I name it to the same CLS namespace? - If I need to set all my datacontracts under MyApp.IO to use the CLS namespace is there a simple way to do this without setting all of them manually?
- Is there a simple way to set the CLS namespace as contract namespace for the entire service and its datacontracts?
Question 1. The namespace can be anything. People typically use a URI of some form but it does not have to point to an actual web page. Often people will use a version identifier in the namespace but there are no rules about what you should do.
Question 2. See above.
Question 3. You can set the namespace for all contracts like this:
You can check out this MSDN Article for more information