Asp.Net Core 2.0 Web Application Static Files Gives 404

I had the problem during development. I used the overloaded method of UseStaticFiles to set the option ServeUnknownFileTypes to true.

public void Configure(IApplicationBuilder app, IHostingEnvironment env) {
    app.UseDeveloperExceptionPage()
        .UseSession()
        .UseStaticFiles(new StaticFileOptions
        {
            ServeUnknownFileTypes = true,
        })
        .UseDirectoryBrowser()
        .UseRequestLocalization()
        .UseMvcWithDefaultRoute();
}

I am not sure, but it looks like your extension is denied by IIS settings to access directly as a static resource. Please, try this for the web.config:

<configuration> 
   <system.webServer> 
       <security> 
          <requestFiltering> 
              <fileExtensions> 
                <add fileExtension=".appinstaller" allowed="true" /> 
              </fileExtensions> 
         </requestFiltering> 
       </security> 
    </system.webServer> 
</configuration> 

Also check request filtering. See more information: How to deny access to a specific file name extension