Bonjour cher tous ,
J' ai une appli client serveur (WCF et c#) qui tourne assez bien.Mais j'ai un petit bug que je n'arrive pas a m expliquer.
Voici comment j'initialise mon client 10.10.10.10
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 static string endPointAddr = System.Configuration.ConfigurationManager.AppSettings["AddrHttp"]; static public BasicHttpBinding httpBinding = new BasicHttpBinding(); static public IeDipSvcSAS sas = ChannelFactory<IeDipSvcSAS>.CreateChannel(httpBinding, new EndpointAddress(http://localhost:9001/monWCFService));j'obtiens http://10.10.10.10:3350 .
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 Coté serveur lorsque j 'essai de récupérer l'@ du client connecté comme ceci : OperationContext context = OperationContext.Current; MessageProperties prop = context.IncomingMessageProperties; RemoteEndpointMessageProperty endpoint = prop[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty; string strID = endpoint.Address + ":" + endpoint.Port;
Ce que je ne comprends pas c'est pourquoi le port est 3350 et non 9001 ??
Partager