title: VS 2013 / IIS Express - serve site from localhost:port/myapp instead of localhost:port
body: <p>In prod my site (mvc5) is hosted on <code>https://company.no/myApp/</code> where myApp is an Application on IIS.</p>
  
  <p>In dev my site is hosted on IIS Express on <code>http://localhost:54307/</code></p>
  
  <p>As this causes some truble with server relative paths I would like to also do my debugging on <code>http://localhost:54307/myApp</code>.</p>
  
  <p>This is what I've tried:</p>
  
  <ul>
  <li>Setting project url in property pages to <code>http://localhost:54307/myApp</code> and clicking Create Virtual directory</li>
  <li>Tried the override application root with or without the myApp url.</li>
  <li><p>Tried modify the applicationhost.config. Currently my setting looks like this:</p>
  
  <pre><code>  &lt;site name="MyApp.Web-Site" id="38"&gt;
          &lt;application path="/" applicationPool="Clr4IntegratedAppPool"&gt;
              &lt;virtualDirectory path="/" physicalPath="C:\Projects\OP\MyApp\Main\src\MyApp.Web" /&gt;
          &lt;/application&gt;
          &lt;application path="/MyApp" applicationPool="Clr4IntegratedAppPool"&gt;
              &lt;virtualDirectory path="/" physicalPath="C:\Projects\OP\MyApp\Main\src\MyApp.Web" /&gt;
          &lt;/application&gt;
          &lt;bindings&gt;
              &lt;binding protocol="http" bindingInformation="*:54307:localhost" /&gt;
              &lt;binding protocol="https" bindingInformation="*:44307:localhost" /&gt;
          &lt;/bindings&gt;
      &lt;/site&gt;
  </code></pre></li>
  </ul>
  
  <p>When I try to open page from the myApp folder I get the follownig error:</p>
  
  <pre><code> Module    IIS Web Core
   Notification      BeginRequest
   Handler       Not yet determined
   Error Code    0x800700b7
   Config Error      Cannot add duplicate collection entry of type 'add' with unique key attribute      'name' set to 'WSFederationAuthenticationModule'
   Config File       \\?\C:\Projects\OP\MyApp\Main\src\MyApp.Web\web.config
   Requested URL     http://localhost:54307/MyApp
   Physical Path     C:\Projects\OP\MyApp\Main\src\MyApp.Web
  </code></pre>
  
  <p>That indicates web.config loaded twice. Any idea what I'm doing wrong?</p>
  
  <p>Thanks for any help</p>
  
  <p>Larsi</p>