ASP.NET Core 404-Fehler bei Veröffentlichung in IIS 7.5

Ich verwende Visual Studio 2015, um meine ASP.NET Core-App in IIS 7.5 zu veröffentlichen. Ich versuche nur, eine normale default.htm-Seite in meinem WWW-Stammverzeichnis anzuzeigen. Alles funktioniert einwandfrei, wenn ich IIS Express von VS verwende. Wenn ich jedoch auf IIS 7.5 veröffentliche und den physischen Pfad auf den Ordner wwwroot verweise, den Visual Studio beim Veröffentlichen erstellt hat, wird nur ein leerer Bildschirm angezeigt (404). Was seltsam ist, wenn ich die Standardmethode app.run in der Configure-Methode von startup.cs ausführe, funktioniert das perfekt:

app.Run(async (context) =>
            {
                await context.Response.WriteAsync("Hello World!");
            });

Wenn ich das jedoch auskommentiere, benutze ich die app.UseDefaultFiles () und app.UseStaticFiles (), ich bekomme nichts. Hier ist meine Startup.cs-Datei:

public class Startup
    {
        // This method gets called by the runtime. Use this method to add services to the container.
        // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940
        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.UseIISPlatformHandler();
            //app.UseDirectoryBrowser();
            //app.UseDefaultFiles();
            //app.UseStaticFiles();

            app.Run(async (context) =>
            {
                await context.Response.WriteAsync("Hello World!");
            });
        }

        // Entry point for the application.
        public static void Main(string[] args) => WebApplication.Run<Startup>(args);
    }

Hier ist meine web.config-Datei:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
    </handlers>
    <httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="false" startupTimeLimit="3600"/>
  </system.webServer>
</configuration>

Und hier ist meine project.json-Datei:

{
  "version": "1.0.0-*",
  "compilationOptions": {
    "emitEntryPoint": true
  },

  "dependencies": {
    "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
    "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final"
  },

  "commands": {
    "web": "Microsoft.AspNet.Server.Kestrel"
  },

  "frameworks": {
    "dnx451": { },
    "dnxcore50": { }
  },

  "exclude": [
    "wwwroot",
    "node_modules"
  ],
  "publishExclude": [
    "**.user",
    "**.vspscc"
  ]
}

Ich habe bereits sichergestellt, dass ich httpPlatformHandler v1.2 heruntergeladen habe. Wenn ich von VS aus veröffentliche, ziele ich auf die DNX-Version dnx-clr-winx86.1.0.0-rc1-update1 ab und setze ein Häkchen bei den beiden folgenden Optionen ( Löschen Sie alle vorhandenen Dateien, bevor Sie sie veröffentlichen, und kompilieren Sie die Quelldateien in NuGet-Paketen. In IIS Express läuft alles einwandfrei. Wenn ich versuche, IIS 7.5 zu verwenden, wird es unkonventionell.

Irgendwelche Vorschläge

Antworten auf die Frage(2)

Ihre Antwort auf die Frage