title: 404 error Localhost:8000 asp.Net
body: <p>If I un-comment the <code>app.Run(async (context) =&gt; ...</code> part of the code I can run the html within the code without any issues. I am trying to use the index.html in wwwroot to be default. But I get a 404 error. How do I fix this?</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Threading.Tasks;
  using Microsoft.AspNet.Builder;
  using Microsoft.AspNet.Hosting;
  using Microsoft.AspNet.Http;
  using Microsoft.Extensions.DependencyInjection;
  
  namespace TheWorld
  {
      public class Startup
      {
          public void ConfigureServices(IServiceCollection services)
          {
          }
  
          // This method gets called by the runtime. Use this method to  configure the HTTP request pipeline.
          public void Configure(IApplicationBuilder app)
          {
  
            //  app.Run(async (context) =&gt;
            //{
            //    var link = @"&lt;!DOCTYPE html&gt;
            //   &lt;html&gt;
            //      &lt;head&gt;
            //      &lt;title&gt;test&lt;/title&gt;
            //      &lt;/head&gt;
            //      &lt;body&gt;
            //          &lt;h1&gt;TestFile&lt;/h1&gt;
            //      &lt;/body&gt;
            //    &lt;/html&gt;";
            //    await context.Response.WriteAsync(link);
            //});
          }
  
  
          // Entry point for the application.
          public static void Main(string[] args) =&gt; WebApplication.Run&lt;Startup&gt;    (args);
      }
  }
  </code></pre>