WCF Exception: "There can be at most one address per scheme in this collection"
I'm beginning to see why people dislike WCF.
I'm working on using WCF to feed an AJAX TreeView, and demos of it are FAST. However, in my debugging on my dev server I bumped into the exception:
"There can be at most one address per scheme in this collection"
The posters at http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/9e248455-1c4d-4c5c-851c-79d9c1631e21/#page:1 seem to be most vocal about the definiciencies of WCF in this respect - and they'd be right. What were Microsoft thinking? Most web applications need to respond to at least two domains to overcome the vagaries of user-inputted URLs, eg:
- www.myapp.mysite.com
- mapp.mysite.com
- myapp
Are all potentially valid patterns for accessing an internal web application. We shouldn't need workarounds to get this to work.
Removing the extra host header record fixes the issue. Surely they weren't expecting people to write their WCF services under a separate, discrete URL, like wcf.myapp.mysite.com?