Darkleo’s Blog
Ein Schatz, der seinen Besitzer überallhin begleitet.

IP und Port in WCF lesen

January 30th, 2008 by darkleo

Ein kleiner Snippet wie man an die IP und Port in WCF dran kommt. 

 
OperationContext context = OperationContext.Current;
 
MessageProperties messageProperties = context.IncomingMessageProperties;
 
RemoteEndpointMessageProperty endpointProperty =
  messageProperties[RemoteEndpointMessageProperty.Name]
  as RemoteEndpointMessageProperty;
 
//IP-Adresse: endpointProperty.Address
//Port: endpointProperty.Port
 

Posted in .NET, C#, WCF

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.