The TransportManager failed to listen on the supplied URI using the NetTcpPortSharing service: the service failed to listen - wcf-binding

When I try to start the service I am receiving this exception.
System.ServiceModel.AddressAlreadyInUseException: The TransportManager failed to listen on the supplied URI using the NetTcpPortSharing service: the service failed to listen
Any suggestion or help is apricated.

You can refer to this website to troubleshoot: https://mytechref.wordpress.com/2009/12/08/the-transportmanager-failed-to-listen-on-the-supplied-uri-using-the-nettcpportsharing-service/
and also How to: Enable the Net.TCP Port Sharing Service

Related

Running WCF Service Host on a different port

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.'

Create SSL endpoint on port 443 for self-hosted OWIN listener

I am using a self-hosted OWIN listener for a Web API implementation that runs in a local process. However, I am unable to listen on port 443 successfully.
The following works:
var startOptions = new StartOptions();
startOptions.Urls.Add("http://127.0.0.1:9866");
startOptions.Urls.Add("https://127.0.0.1:9877");
webServer = WebApp.Start<PbiMockStartup>(startOptions);
However, when change the port numbers to 80 and 443, I consistently get 503 - Service Unavailable. I added the same SSL certificate for both 9877 and 443 ports using the netsh command with no luck.
I see from "netstat" that the "SYSTEM" process with PID (4) is listening on port 443 already, however I could not find a way to stop it other than disabling the HTTP.sys module, which will not work for me.
How does one go about listening on port 443 from a self-hosted OWIN listener?
I tried adding URLs with "localhost" and machine-name in the startup options, but the final solution that worked out was to have a '+' like following:
var startOptions = new StartOptions();
startOptions.Urls.Add("http://+:80");
startOptions.Urls.Add("https://+:443");
webServer = WebApp.Start<MyMockClass>(startOptions);

SSL springboot Verify the connector's configuration

I want to use ssl in my springboot app. I use this tutorial but when I try up start my app gives me this error:
***************************
APPLICATION FAILED TO START
***************************
Description:
The Tomcat connector configured to listen on port 8443 failed to start. The port may already be in use or the connector may be misconfigured.
Action:
Verify the connector's configuration, identify and stop any process that's listening on port 8443, or configure this application to listen on another port.
And my application.properties
#ssl
server.port=8443
server.ssl.key-alias=alias
server.ssl.key-password=password
server.ssl.key-store=classpath:keystore.jks
server.ssl.key-store-provider=SUN
server.ssl.key-store-type=JKS
Or do you know another way to do SSL trusted?
Generate the key with command line running in admin mode.

Cannot call webservice exposed by Mule

I am using Mule to expose a web service and deployed it on AWS . It's working fine locally. I can use SoapUI to test http://localhost:8087/hello. But if we call from outside using the host of AWS: http://xxx.xxx.com:8087/hello, it will show connection error. We've opened the port 8087, what else do we need? Thanks!
If you have defined "localhost" in you mule configuration file mule will only listen on the localhost interface. Change the host in your inbound endpoint to 0.0.0.0 to bind to all available interfaces or explicitly specify the IP you want to listen on for incoming requests.
If this doesn't fix it please verify firewall settings again and then post more information such as relevant parts of you mule configuration file.

How to prevent WCF service to register non 127.0.0.1 adresses?

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.