It sounds like you might have specified several base addresses with the
same protocol? Correct me if I'm wrong, but if you for instance have
three HTTP endpoints, you should only specify one base address, such as http://localhost/MyService
So in the web.config/app.config file:
<add baseAddress="http://localhost/MyService" />
The config file settings assume you are running at least the June CTP
(I believe) of the .NET Framework 3.0. Otherwise, you will have to
specify these addresses in code.
IT-consultant, software developer
Michael Green - MSFT wrote:
> Could you post your web.config file and your .svc file? It sounds like the
> service is being configured incorrectly.
> "Magnus" wrote:
> > Hope someone can help me with this.
> > I have installed Windows SDK Vista (6.0.5472.2.1) on my XP pro machine and I
> > try to run a small test service. This works fine when it is self hosted(by
> > console app) but I get a strange error when trying to host is on IIS (5..1).
> > Error msg (Shortened):
> > [ArgumentException: This collection already contains an address with scheme
> > http. There can be at most one address per scheme in this collection.
> > Parameter name: item]
> > System.ServiceModel.UriSchemeKeyedCollection.InsertItem(Int32 index,Uri
> > item) +2316953 ..........
> > [ServiceActivationException: The service '/hello/HelloWorld.svc' cannotbe
> > 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.
> > Parameter name: item.]
> > System.ServiceModel.HostingManager.EnsureServiceAvailable(String
> > normalizedVirtualPath) +962
> > System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath) +419 ..........
> > BR Magnus