"This collection already contains an address with scheme https. There can be at most one address per scheme in this collection."“Googling” the error brought me a solution soon, but what caused this error message?
The solutionYou can resolve this error by changing the web.config file.
With ASP.NET 4.0, add the following lines to your web.config:
<system.serviceModel> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> </system.serviceModel>
With ASP.NET 2.0/3.0/3.5, add the following lines to your web.config:
<system.serviceModel> <serviceHostingEnvironment> <baseAddressPrefixFilters> <add prefix="https://dev.server.be"/> </baseAddressPrefixFilters> </serviceHostingEnvironment> </system.serviceModel>
The reasonIIS has web sites, which are containers for virtual applications which contain virtual directories. The application in a site can be accessed through one or more IIS binding.
IIS bindings provide two pieces of information – binding protocol and binding information. Binding protocol defines the scheme over which communication occurs, and binding information is the information used to access the site.
Binding protocol – HTTPThe problem is that the IIS server was configured to support multiple bindings, which results in multiple base addresses per scheme. This brings WCF into trouble. A WCF service hosted under a site allows binding to only one baseAddress per scheme.
Binding Information – IPAddress , Port, Hostheader