I created a service with two endpoints, one for netHttpBinding and other for basicHttpBinding.
I am able to "Add Service Reference" from a Client Solution using both addresses ( net.tcp://localhost:8080/Whatever or http://localhost:8000/ProductsService/Service.svc
) from the same machine
But when trying to "Discover" the service from another machine over the network , I'm able to do it using the net.tcp://localhost:8080/Whatever
address but not with the http://localhost:8000/ProductsService/Service.svc
address
When I use the basicHttp one I get the error (http):
I tried to run netsh (running Comand Prompt as Administrator) as:
netsh http add urlacl url=http://+:8000/ user=<Machine Name>\Username
and I get the following error:
Url reservation add failed, Error: 103
Cannot create a file when that file already exists
What do I have to do to "Discover" (with Go of course) the service from another machine using the basicHttp endpoint?
I'm using the ServiceHost type to "publish" the service, and the ServiceModel node (App.config) of the solution that defines the service is:
You are trying to discover the service from its service address - you should really try to discover it from it's mex
address.
Based on your configuration, you should be able to find the service at:
http://machineName:8000/ProductsService/mex
or even at
http://machineName:8000/ProductsService
EDIT
Firewall possibly blocking inbound connections. Add firewall inbound rule on the service host to allow tcp connections on port 8000.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.