How can i get the request IP in a RESTfull service using WebOperationContext ( not OperationContext).
Thank you.
(if im way off -or this is not the way to go about it please let me know aswell)
UPDATE: Here’s a link to the proper way to do it (as the answer below recommends):
WCF 4 Rest Getting IP of Request?
If you want to know the IP of the client, then you can’t do it via the
WebOperationContext(WOC) – you need to get theRemoteEndpointMessagePropertyfrom the “normal”OperationContext. The only thing the WOC will give you is theHostheader from the HTTP request (via itsIncomingRequest.Headersproperty).