find a location for property in a new city

Wednesday, 16 March 2011

WCF REST: How to get the requested URL

Finding the Request.Url is a lot different from standard web work when working in a WCF REST context. It can be quite difficult to find the URL of the request in your WCF REST service.

I found you can do it with the following code:
var context = OperationContext.Current;
var requestedUrl =  context.IncomingMessageHeaders.To.PathAndQuery;

So there you are... enjoy.

More WCF REST:

Follow britishdev on Twitter

9 comments:

  1. Why I got the hostname instead of requested url

    ReplyDelete
  2. Awesome! It sounds great. Much obliged for sharing.. Free SEO Solutions

    ReplyDelete
  3. 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.

    ReplyDelete
  4. I have perused your article. What's more, I know you're an awesome individual. Furthermore, your workforce is likewise doing quite well. web optimization adapting No issue your web page I have a long way to go however I've seen a website half a month ahead of schedule. Which is clarified from the magnificent tracks web optimization. Tips are additionally given every week so in the event that you need to adapt directly in the menu, at that point the information on this site will increment significantly. free pakistani chat rooms

    ReplyDelete


  5. شركة الامارات كلين

    شركة تنظيف كنب العين شركات تنظيف كنب في العين

    شركة تنظيف منازل الشارقة شركات تنظيف منازل بالشارقة
    شركة تنظيف الفجيرة شركات تنظيف بالفجيرة
    شركة تنظيف منازل ام القوين شركات تنظيف ام القوين
    شركة تنظيف عجمان شركات تنظيف في عجمان
    شركة تنظيف سجاد عجمان شركات غسيل سجاد عجمان

    ReplyDelete
  6. Do your online grocery lahore at Al-Fatah, Pakistan's best and largest online grocery website. Shop from a wide range of grocery including oil and ghee, tea and coffee, dry fruits and seeds, dairy and fresh bakery items, packaged foods, snacks and beverages, baby care, household essentials, fruits and vegetables and many more.

    ReplyDelete
  7. 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 : patialalegitimate515@gmail.com
    Mr Sorina Jeffery

    ReplyDelete