title: How to get base url without accessing a request
body: <p>How to get the base URL in AspNet core application without having a request?</p>
  
  <p>I know from the Request you can get the scheme and host (ie <code>$"{Request.Scheme}://{Request.Host}"</code> would give something like <a href="https://localhost:5000" rel="noreferrer">https://localhost:5000</a>), but is it possible to get this information from anywhere else?</p>
  
  <p>In other words, if I have a service class that needs to build absolute URLs, how can I get the current URL when there is not an http request available?</p>
  
  <p>UPDATE: Maybe that scenario does not even make sense since the hosting URL is totally external to the application and that's why it only makes sense to extract it from the Request host..</p>