Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've created a web application on my sharepoint farm: sharepoint.local Name: https://app.sharepoint.local

Outside of my farm the site is available through an UAG server on:
https://app.publicurl.com

(UAG/AAM pointing to the internal url)

In my code behind I use the current url to specify my web app url and execute some code. I was wondring how I could dynamically retrieve my web app url if users are using the public url: https://app.publicurl.com

Are there out of the box functions for this?

share|improve this question

1 Answer 1

You can use this.Page.Request.Url, unless I'm missing something.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.