简体   繁体   中英

How to disable WCF self-hosted localhost pc only service promotion of firewall port exception window?

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM