I'm hosting local WCF service on TCP. On app start user receiving Firewall prompt to create firewall exception of port, my service is trying to use.
var host = new ServiceHost(typeof(MyService));
host.AddServiceEndpoint(
typeof(IMyService),
new NetTcpBinding(),
"net.tcp://localhost:18673/MyService");
host.Description.Behaviors.Add(new ServiceMetadataBehavior { HttpGetEnabled = false });
host.Open();
I'm just want to create local PC only service without opening port for local network and I don't want to firewall prompt appear to my app users.
Solved here Hosting WCF locally
All i need is use NetNamedPipeBinding
instead of NetTcpBinding
.
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.