1. error message: {"HTTP cannot register URL http: // +/Temporary_Listen_Addresses/a4db1461-55c6-4ce5-be25-f41b88877434/because another application is using TCP port 80. "}
Environment: When duplex protocols are used. Call the callback method of the client.
Solution: first, change the service of port 80 of the client to another port.
The second is to set the ClientBaseAddress in the client code,
The Code is as follows:
Code
DumplexService. IDuplexSampleCallback clent = new ClientCallback ();
DumplexService. DuplexSampleClient duplexClient = new WebTest. DumplexService. DuplexSampleClient (new System. ServiceModel. InstanceContext (clent ));
WSDualHttpBinding ws = (WSDualHttpBinding) duplexClient. Endpoint. Binding;
Ws. ClientBaseAddress = new Uri ("http: // localhost: 8212 /");
Third, set in the configuration file
Code
<WsDualHttpBinding>
<Binding name = "MyWCFStudy. MyDuplexSet" clientBaseAddress = http: // localhost: 8212/>
<Security mode = "Message"> </security>
</Binding>
</WsDualHttpBinding>
2. error message: this operation deadlocks because a reply cannot be received before the current email is processed. If you want to allow unordered message processing, you can specify multiple concurrencymodes on ServiceBehaviorAttribute.
Production Environment: Duplex protocol.
Solution: Specify the ConcurrencyMode of ServiceBehaviorAttribute as Multiple in the service-side implementation contract class.
Add [ServiceBehavior (ConcurrencyMode = ConcurrencyMode. Multiple)] to the class name.