A WCF coincidence
Today, after giving my lecture on what’s new in WCF 4 as part of Sela’s SDP (Sela Developer Practice) conference, I got an email from one of my clients regarding a problem they encountered when trying to deploy their WCF service to an IIS 6 server. They got exceptions when calling the service, and it seemed it wasn’t able to get hosted. After some investigation they came up with the following error message thrown by WCF:
14/03/2011 14:38: [Exception Type:=System.ServiceModel.ServiceActivationException;Application_Error event(~/Services/xxxxx.svc) ;IP: xxx.xxx.xxx.xxx] - This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
Parameter name: item: Error The service '/Services/xxxxx.svc' cannot be activated due to an exception during compilation. The exception message is: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
Usually my memory doesn’t work so well (the electro-magnetic fields from all the computers and monitors surrounding me all my life are starting to affect my brain), so at this point I should have needed to go and check this message out, but luckily for me (and for my client), this exact message was part of a new WCF 4 feature I talked about in my lecture just a few hours ago – multiple site bindings in IIS.
In the case of my client, they indeed had several names for their machine, and once they used the baseAddressPrefixFilters configuration, everything start to work.
You can look at the rest of the presentation and the sample code at the following link: http://bit.ly/wcf4-sdp11
As soon as it will be available on video (in Hebrew), I’ll let you know.