Home > Net >  Communication object System. ServiceModel. Channels. ServiceChannel cannot be used for communication
Communication object System. ServiceModel. Channels. ServiceChannel cannot be used for communication

Time:09-21

The client is clickonece deployment,
Put a Windows server host WCF,
Once after server restart, client connection, can appear the error, over a period of time to connect, or the client after the restart,
To connect several times, in the uncertain time, its own good, what does it mean?

CodePudding user response:

Someone, webmaster help me

CodePudding user response:

Host1=New ServiceHost (GetType (Mywcf. Login), the New Uri (" net. TCP://localhost: "& amp; Txt_ port. The Text & amp; "/"))
Host1. Description. Behaviors. The Add (New ServiceMetadataBehavior ())
Host1. AddServiceEndpoint (GetType (IMetadataExchange), MetadataExchangeBindings. CreateMexTcpBinding (), "A")
Host1. AddServiceEndpoint (GetType (Mywcf Ilogin), New NetTcpBinding (SecurityMode. None, False), "")
This is the key to my WCF statement, 2, line 3 and I don't know is what meaning, I want to save the result error, and then also don't know of their mechanism, the use NetTcpBinding also don't know or don't fit, will not because this cause fault state, a mess,
  •  Tags:  
  • C#
  • Related