title: Unable to run the Angular2 app in IIS
body: <p>I followed the Angular2 <a href="https://angular.io/docs/ts/latest/quickstart.html" rel="nofollow noreferrer">Quick start example</a> and used <strong>live-server</strong> to run it. It works fine.</p>
  
  <p>I created then a <strong>web site</strong> in IIS and set the virtual directory to  the directory where I have the <strong>index.html</strong> file. When I run the website I get the following error. The error happens when the IIS tries to server app.ts.</p>
  
  <p>How can run the Angular2 app in IIS?</p>
  
  <blockquote>
    <p>The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.</p>
  </blockquote>
  
  <p><em>UPDATE:</em></p>
  
  <p>Solution: I created a new <strong>web.config</strong> file and added the following snippet of code to add the MIME type. This will be used by the IIS as the local web app settings.</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;system.webServer&gt;
          &lt;staticContent&gt;
              &lt;mimeMap fileExtension=".ts" mimeType="application/x-typescript" /&gt;
          &lt;/staticContent&gt;
      &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/7Kjhb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7Kjhb.png" alt="enter image description here"></a></p>