WCF Best Practice #2: Don't forget XmlNamespace settings
In addition to the WCF Best Practices that are already around. WCF Best Practice #2: Don't forget XmlNamespace settings:
By default WCF puts the “http://tempuri.org/” namespace in your wsdl and contracts. Normally you don’t want this. You can control this from three places:
- In your config file in the services/service/endpoint/bindingNamespace attribute
- In your servicecontract: [ServiceContract(Namespace="http://myuri.net/")]
- In your servicebehavior: [ServiceBehavior(Namespace="http://myuri.net/")]
Update: Ron Jacobs also has a nice step by step article on this one: http://blogs.msdn.com/b/rjacobs/archive/2011/05/12/how-to-eliminate-tempuri-org-from-your-service-wsdl.aspx