title: get application url from current request
body: <p>I am writing a c# application.</p>
  
  <p>I am accessing a page eg <a href="http://dev.mysite.com/page.aspx" rel="noreferrer">http://dev.mysite.com/page.aspx</a></p>
  
  <p>How can I retrieve from the current context this <a href="http://dev.mysite.com/" rel="noreferrer">http://dev.mysite.com/</a></p>
  
  <p>I want to use this when creating url's in different environments so need to read it from the current request context.</p>