What kinds of non-HTTP addresses are allowed in WCF endpoints?
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>开发者_StackOverflow
</service>
</services>
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
精彩评论