I am hosting a WCF service in WPF and trying to get the service reference in Console Application. I have tried to host the WCF (using the same code provided below) in a console application and it worked perfectly however when I try to host the service in
WPF I am getting the following error:
Metadata contains a reference that cannot be resolved: 'net.pipe://localhost/'.
There was no endpoint listening at net.pipe://localhost/ that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
The pipe endpoint 'net.pipe://localhost/' could not be found on your local machine.
If the service is defined in the current solution, try building the solution and adding the service reference again.
The way I host is:
Dim _baseAddress As Uri
Dim _netNamedBinding As NetNamedPipeBinding
_netNamedBinding = New NetNamedPipeBinding()
_netNamedBinding.CloseTimeout = New TimeSpan(1, 1, 1, 1, 1)
Using host As New ServiceHost(GetType(PubSubService), _baseAddress)
View Complete Post