Many times we need to know the IP address of the client machine.
Why? well the simple reason could be to check the IP address for whitelist/blacklist IP ranges.
Here is the answer:
OperationContext objContext = OperationContext.Current;
MessageProperties messageProperties = objContext.IncomingMessageProperties;
RemoteEndpointMessageProperty endpointProperty = (RemoteEndpointMessageProperty
)messageProperties[RemoteEndpointMessageProperty.Name];
Enjoy
1 comment:
hi Javed..nice to see your blogs..isme contentes ka colur change ker do..visibale nahi hia puri tarah se..
Post a Comment