title: Get application base URL .net Core
body: <p>I'm using this code to get the application base URL,</p>
  <pre><code>            StringValues requestOriginStrings;
              string url = &quot;&quot;;
              var found = Request.Headers.TryGetValue(&quot;Origin&quot;, out requestOriginStrings);
              if (found)
              {
                  url = requestOriginStrings.FirstOrDefault() + &quot;/sendpassword/&quot;;
              }
              
  </code></pre>
  <p>Thsi works in localhost but not after deployment,</p>
  <p>because the application link has two slashes :http://Domain/AppName , and so i get only &quot;Domain&quot; but not &quot;Domain/AppName&quot;</p>
  <p>How can i get the AppName?</p>
  <p>Any help? and Thanks</p>