110,538
社区成员
发帖
与我相关
我的任务
分享
string manageUri = "net.tcp://" + manageIp + ":9005/CSCommunicationService";
string manageUri = "net.tcp://localhost:9005/CSCommunicationService";
ServiceHost m_serviceHostA = null;
m_serviceHostA = new ServiceHost(typeof(CSCommunication.CSCommunicationService));
NetTcpBinding binding = new NetTcpBinding();
binding.Security.Mode = SecurityMode.None;
binding.Security.Message.ClientCredentialType = MessageCredentialType.Windows;
binding.Security.Transport.ClientCredentialType = TcpClientCredentialType.Windows;
EndpointIdentity identity = EndpointIdentity.CreateDnsIdentity("localhost");
string manageIp = NetConnection.getIP();
string manageUri = "net.tcp://" + manageIp + ":9005/CSCommunicationService";
m_serviceHostA.AddServiceEndpoint(typeof(CSCommunication.ICSCommunicationService), binding, manageUri);
m_serviceHostA.Open();