Answered by:
WCF Error

Question
-
Hi all I am trying to deploy a wcf service and I am getting the following error: This collection already contains an address with scheme http. There can be at most one address per scheme in this collection. I found a hack that changes the svc file by adding a attribute Factory. The only thing is when I try this I get a compolation error that says that the Factory attribute is not a vallid attribute for the ServiceHost tag. Does anybody know how to get this working.
Answers
All replies
-
-
-
If you have base addresses defined in the config file, they will be under a section called "host" as follows:Code Snippet<host><baseAddresses><add baseAddress="http://localhost:8000/service"/><add baseAddress="net.tcp://localhost:8001/service"/></baseAddresses></host>
-
-
Under IIS your base address is provided by the host. Take a look at these links. The first one shows you how to host a WCF service in IIS and the latter two deal with corner cases that may help you out.
-
I checked out the links and it brings me back to my first problem
<%@ ServiceHost Language="C#" Debug="true" Service="MyService.MyService" Factory="MyService.MultipleHostsFactory" %>
The factory attribute above gives me a compolation error. How do I get past this?
-
I checked out the links tx.
There's only one thing when looking at
<%@ ServiceHost Language="C#" Debug="true" Service="MyService.MyService" Factory="MyService.MultipleHostsFactory" %>
The factory attribute above gives me a compolation error. How do I get past this?
-
Unless your scenario is the same as the guy's who wrote the article, stick with the simple MSDN example (first link). Start over from sctatch, verify that you can get a simple Hello World app running, and then modify it with your custom interfaces and logic.
-
Thanks I thought this was going to be difficult. I know the code works. It was up and running this morning. The reason I asked about IIS is there were some configuration changes made and the next thing I knew I kept getting this error. Thanks for the help
-