Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

Problem Hosting WCF on IIS

 
 
Thread Tools Display Modes
Old 08-28-2006   #1 (permalink)
=?Utf-8?B?TWFnbnVz?=
Guest


 

Problem Hosting WCF on IIS

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' 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.
Parameter name: item.]
System.ServiceModel.HostingManager.EnsureServiceAvailable(String
normalizedVirtualPath) +962

System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath) +419 ..........


BR Magnus


Old 09-07-2006   #2 (permalink)
=?Utf-8?B?TWljaGFlbCBHcmVlbiAtIE1TRlQ=?=
Guest


 

RE: Problem Hosting WCF on IIS

Magnus,

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' 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.
> Parameter name: item.]
> System.ServiceModel.HostingManager.EnsureServiceAvailable(String
> normalizedVirtualPath) +962
>
> System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath) +419 ..........
>
>
> BR Magnus
>
>

Old 09-08-2006   #3 (permalink)
sprattel
Guest


 

Re: Problem Hosting WCF on IIS

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:

<host>
<baseAddress>
<add baseAddress="http://localhost/MyService" />
</baseAddress>
</host>

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.


Cheers
-----------------------------------------------
Mikael Rydström
IT-consultant, software developer
Sogeti


Michael Green - MSFT wrote:
> Magnus,
>
> 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
> >
> >


 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
bug in the PS hosting API... graycats PowerShell 4 06-16-2008 10:57 AM
Need Hosting? - Best selling hosting providers listed here HostingFreakzz@gmail.com Avalon 0 08-17-2006 01:04 PM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50