find a location for property in a new city

Wednesday 16 March 2011

WCF REST: How to get an IP address of a request

It seems to be quite difficult to find the IP of the request when in the Context of a WCF REST service.

I found you can do it with the following code:
var props = OperationContext.Current.IncomingMessageProperties;
var endpointProperty = props[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty;
if (endpointProperty != null)
    var ip = endpointProperty.Address;

This seems overly verbose so you may want to consider putting this code into helper methods or a base class for re-use.


Follow britishdev on Twitter


  1. A British IP address is one of the most popular IP addresses in the world. British IP Address

  2. Thanks so much with this fantastic new web site. very fired up to show it to anyone. It makes me so satisfied your vast understanding and wisdom have a new channel for trying into the world. lemigliorivpn

  3. Incredibly composed blog that has transfixed its group of onlookers.

  4. I am impressed. I don't think Ive met anyone who knows as much about this subject as you do. You are truly well informed and very intelligent. You wrote something that people could understand and made the subject intriguing for everyone. Really, great blog you have got here.

  5. Motifz Designer Lawn. 1, 2 & 3 Piece Unstitched Premium Embroidered Lawn 2019, Premium embroidered Lawn, Premium lawn, Premium lawn 2019, Motifz, Premium lawn in Pakistan, Summer collection. Shipping worldwide. Stitching option available.

  6. Wow this was amazing. I was just about to look for some expert and educative content like this, I am grateful that I have frequented here! Cliquez-ici

  7. Good composed article. It will be steady to any individual who uses it, including me. Continue doing what you are doing – can'r hold up to peruse more posts. Klik hier

  8. I wish more authors of this type of content would take the time you did to research and write so well. I am very impressed with your vision and insight. Meer hierover leest je hier

  9. Good composed article. It will be steady to any individual who uses it, including me. Continue doing what you are doing – can'r hold up to peruse more posts. internetet securite website

  10. Very efficiently written information. It will be beneficial to anybody who utilizes it, including me. Keep up the good work. For sure i will check out more posts. This site seems to get a good amount of visitors.

  11. The data you have posted is exceptionally valuable. The locales you have alluded was great. A debt of gratitude is in order for sharing.. check my ip address

  12. I’ve been surfing online more than 5 hours today, yet I never found any interesting article like yours without a doubt. It’s pretty worth enough for me. Thanks...

  13. That's why it's advisable that you simply correct exploration previous to crafting. It's possible to develop superior release in this way. microsoft office 365 product key

  14. Do you need Quick Loan to settle your bills and startup
    business? contact us now with your details to get a good
    Loan at a low rate of 2% per Annual
    Do you need Personal Finance?
    Business Cash Finance?
    Unsecured Finance
    Fast and Simple Finance?
    Quick Application Process?
    Finance. Services Rendered include,
    *Debt Consolidation Finance
    *Business Finance Services
    *Personal Finance services Help
    contact us for more information on how to get started:
    (Whats App) number:+919394133968
    please contact email id :
    Mr Sorina Jeffery

  15. Great post. I was checking constantly this blog and I'm

    impressed! Extremely helpful info specially the last part :

    ) I care for such information much. I was seeking this certain info for

    a very long time. Thank you and good luck.
    Acts 1:8 Foundation

  16. Hi – in actuality great site you have created. I enjoyed reading this posting. I did want to publish a remark to tell you that the design of this content is very aesthetically delightful. I used to be a graphic designer, now I am a copy editor. I have always enjoyed functioning with information processing systems and am trying to learn code in my free time.
    Football news, scores, results, fixtures and videos from the Premier League, Championship, European and World Football from the BBC. Get the latest live football scores, results & fixtures from across the world, including UEFA Champions League, powered by Season Record. Overall 0-1; PCT .000; Conf 0-0; PCT .000; Streak L1; Home 0-0; Away 0-1; Neutral 0-0. Scheduled Games. Montana State University Logo. Live Soccer TV - Football TV Listings & Official Live Streams, Live Soccer Scores, Fixtures, Tables, Results, News, Pubs and Video Highlights. What is football Football is a family of team sports that involve, to varying degrees, kicking a ball to score a goal. Unqualified, the word football normally means the form ... Football live Match today live Check live score, live cricket scorecard, upcoming cricket matches and latest news and videos for today's live cricket matches on ESPN cricinfo. ‏Result · ‏Cricket Schedule | Upcoming... · ‏IND vs WI 2nd Test Queen's... · ‏Summary Live cricket Match today Live football match today IPL live Match Today Star Sports live cricket match today IPL live match IPL live score IPL live match online Cricinfo live score Live Football TV Sport live football Live Soccer TV Live football match Free live score Football live score Football 24 live scores Live score 24 Flash score Sofascore