Question

I'm just trying to save time by not learning about IIS and WAS, so I made a console application to host my WCF service. However, that leaves me uncertain as to how to specify an endpoint address that is not an HTTP address. Could the following config be the source of my runtime error? The exception description was: Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding. Registered base address schemes are [].

<system.serviceModel>
 <services>
  <service name="WcfService1.Service1">
    <endpoint
      contract="WcfService1.IService1"
      binding="wsHttpBinding"
      address="c:\users\owner\documents\visual studio 2010\projects\wcftest\wcfservice1\wcfservice1\service1.svc"/endpoint>
  </service>
 </services>

Was it helpful?

Solution

The word you're looking for is bindings. You change the binding attribute to match a binding that supports your desired protocol. For a simple console service host, I'd probably start with the netTcpBinding, which allows binding to an ipaddress:port combination.

Example:

net.tcp://localhost:8000/myservice

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top