Hi,
I have worked with WCF for a while now but there is somthing Im not clear on.
When hosting a WCF service in IIS the standard protocol will be http and the default port is 80. Its possible to change this portnr if needed.
Then its also possible to host a WCF service in IIS using the TCP protocol(WAS). The WCF service will however still publish its mex on port 80 on http prootocol but how do I see the port nr for the WCF TCP communication?
I Supose that I will have to open first the port nr for the mex(usually port 80) and then also the WAS(WCF TCP in IIS) port?
BestRegards
You can see which port TCP will use by going into the website configuration in IIS and looking at the site bindings, then looking for (or adding, if necessary) the net.tcp binding. Here is the documentation on how to configure bindings.
If I remember correctly, the default port is 808.
Related
The Consul documentation shows how to register external services, but the examples shown are always targeting port 80 (and 443 only for health checks, which is even more peculiar) - example: https://learn.hashicorp.com/tutorials/consul/service-registration-external-services
If you register a service for port 443, a using service having it as upstream in fact gets a port opened from its local Envoy, but one cannot access this port - curl always complains about wrong protocol version. In contrast, if one registers a service for port 80, plain HTTP access works as expected.
Does anybody have an idea how an https based service can be provided as external service?
Is it possible to run WcfSvcHost.exe (WCF Service Host) that ships with Visual Studio to run on a port other than port 80? I am trying to debug a WCF service, but my machine is already running Apache on port 80.
I could go and set Apache to use a different port, but it would be easier if there is a way to do it in WcfSvcHost.
Currently when I try to run my service project, it gives me the dreaded "port in use" message:
'HTTP could not register URL http://+:80/Temporary_Listen_Addresses/a655b03e-30ff-4818-b561-ef52e4cb1e3d/ because TCP port 80 is being used by another application.'
When registering a WCF Service I get
HTTP could not register URL http://+:8080/ because TCP port 8080 is being used by another application
Looking at the used ports with
netstat -an | grep 8080
I can see that TCP 127.0.0.2:8080 is used (I'm using ssh to tunnel from 127.0.0.2:8080 to a remote service).
Probably the WCF service tries not only to register at 127.0.0.1 and the network ips but also on 127.0.0.2.
How can I configure the WCF service to not try to listen to 127.0.0.2:8080 but only to 127.0.0.1:8080 and the network ip adresses? Or can I configure the init process that adresses where the service can not be registered are just ignored?
whole 127/8 block signifies localhost. so both 127.0.0.1 and 127.0.0.2 point to local machine. which implies 127.0.0.1:8080 is same as specifying 127.0.0.2:8080.
they both point to same service which in this case is ssh tunnel . hence WCF fails to register
solution is to change port number.
We are trying to run a wcf service with net.tcp binding using port 80. When we try to start the service we get error 10013.
The service worked fine on port 8099 untill operations blocked the port :)
Our alternative is to switch to basichttpbinding.
What I am wondering is: Is there some fundamental reason why nettcp binding does not work with port 80.
Port 80 is probably being used already by IIS. You'd need to disable the websites running on that port.
Try checking if there's any application already using port 80, or try running it as administrator. Firewall rules can make this problem appear too.
See if it helps.
Does the TCPPortSharing service permit me to have a WAS activated TCP-Based service on the same port as IIS's port 80?
The picture below shows net.tcp at port 808. Can I change this to port 80? If the answer is "no" then am I misunderstanding the benefit of the tcpportsharing service?
The default port for net.tcp scheme that is published is 808. Similar to SSL 443.
This means that you don't need to specify 808 when sending a request to a net.tcp endpoint from WCF and give this information to all your clients. You can host multiple services listening on the default port using Windows activation service.
IIS will use port 80 by default but there is nothing stopping you from making net.tcp on 80 but you cannot share the port on different scheme.