2017-03-06 29 views
0

我在TCP上託管本地WCF服務。在應用程序啓動用戶接收防火牆提示以創建端口的防火牆例外時,我的服務正在嘗試使用。如何禁用WCF自託管本地主機pc唯一服務提升防火牆端口異常窗口?

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(); 

我只是想不針對本地網絡端口開啓創建本地PC唯一的服務,我不希望防火牆提示似乎我的應用程序的用戶。

回答

相關問題