WCF Get Endpoint from my Client
-
Hello, i'm writing a WCF Application and need to know, which IPAddress/Port i use to communicate with the WCF-Service. I don't want to know on which Port i'm connected on the Server (RemoteEndpointMessageProperty), i want to know which IP/Port my network card uses to connect to the Server. I hope you can help me. Thank you :-)
-
Hello, i'm writing a WCF Application and need to know, which IPAddress/Port i use to communicate with the WCF-Service. I don't want to know on which Port i'm connected on the Server (RemoteEndpointMessageProperty), i want to know which IP/Port my network card uses to connect to the Server. I hope you can help me. Thank you :-)
Assuming you are using a
DuplexClientBase<>
derived class, you can useclient.Endpoint.Address
whereclient
is an instance of the derived class.Regards, Nish
My technology blog: voidnish.wordpress.com Code Project Forums : New Posts Monitor This application monitors for new posts in the Code Project forums.
-
Assuming you are using a
DuplexClientBase<>
derived class, you can useclient.Endpoint.Address
whereclient
is an instance of the derived class.Regards, Nish
My technology blog: voidnish.wordpress.com Code Project Forums : New Posts Monitor This application monitors for new posts in the Code Project forums.
Hello, thank you. But i use the DuplexChannelFactory and there i have a client.Endpoint.Address, but i get back the Address from the service. So what to do now? Thank you
-
Assuming you are using a
DuplexClientBase<>
derived class, you can useclient.Endpoint.Address
whereclient
is an instance of the derived class.Regards, Nish
My technology blog: voidnish.wordpress.com Code Project Forums : New Posts Monitor This application monitors for new posts in the Code Project forums.
I haven't any solution yet... I tried this with "OperationContext.Current.OutgoingMessageHeaders.From" on local side, but there's no success. :confused: Is it so difficult to get the IP Address from where i send a message? Or if it's a incoming Callback-Message to get the Endpoint on which the Message came in?