title: How do I tell IIS to serve static files from the web root with an underlying catch-all route in my .NET application?
body: <p>I have a web application that is built with .NET 5 beta-4 and running on IIS 8.5.</p>
  
  <p>I want IIS to serve all static files, so I removed the .NET 5 static file middleware. This generally works as expected. <code>/img/image.png</code> will be served correctly via IIS, for example.</p>
  
  <p>However, in my .NET application I have a catch-all route (<code>"/{param?}"</code>) that serves business requirement purposes. But I also have a few static files in my webroot folder that need to be served (<code>robots.txt</code>, <code>favicon.ico</code>, etc).</p>
  
  <p>The problem I'm running into:
  IIS routes web root static file requests to the .NET application, that will then run the catch-all route, which in turn will result in a <code>404</code>. Ideally, I want IIS to serve the static file in the web root directory if it finds one. If it doesn't find one, send the request to the .NET catch-all route.</p>
  
  <p><strong>How do I tell IIS 8.5 to serve static files from web root with an underlying catch-all route in my .NET 5 application?</strong></p>