title: Get IIS Web Site Application Name
body: <p>I'm trying to get the web application name I'm currently in. (Where my application code is deployed in IIS).</p>
  
  <p>I can get the IIS server name:</p>
  
  <pre><code>string IISserverName = HttpContext.Current.Request.ServerVariables["SERVER_NAME"];
  </code></pre>
  
  <p>The current web site:</p>
  
  <pre><code>string currentWebSiteName = HostingEnvironment.ApplicationHost.GetSiteName();
  </code></pre>
  
  <p>I can't find a way to get the web application name! Because I need to build a path, depending in what web application am I, to get all virtual directories.</p>