Ich hatte eine ASP.NET Core-Anwendung, die ich gerade in ein Upgrade auf 1.1 ging. Diese Anwendung funktionierte früher gut und ich konnte sie veröffentlichen (über Publish Command in Visual Studio) und es funktionierte gut unter IIS. Ich habe das vor kurzem geändert 1.1 und hat die Anwendung im Debug-Modus in Ordnung zu laufen. Nun, wenn ich es veröffentliche ichASP.NET Core 1.1 schlägt fehl, wenn veröffentlicht
502 - Web server received an invalid response while acting as a gateway or proxy server.
bekommen drehte ich mich auf Anforderungsfehler Regeln Tracing und dort in ich folgendes
MODULE_SET_RESPONSE_ERROR_STATUS
ModuleName httpPlatformHandler
Notification EXECUTE_REQUEST_HANDLER
HttpStatus 502
HttpReason Bad Gateway
HttpSubStatus 3
ErrorCode The server is currently disabled. (0x8007053d)
Meine veröffentlicht web.config-Datei sieht wie folgt aus
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<remove name="httpPlatform" />
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\Cranalytics.dll" forwardWindowsAuthToken="true" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>
Meine project.json Datei sieht so aus
{
"dependencies": {
"Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final",
"Microsoft.EntityFrameworkCore": "1.1.0",
"Microsoft.EntityFrameworkCore.InMemory": "1.1.0",
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
"Microsoft.AspNetCore.Diagnostics": "1.1.0",
"Microsoft.AspNetCore.Mvc": "1.1.0",
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.1.0",
"Microsoft.AspNetCore.StaticFiles": "1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
"Microsoft.Extensions.Caching.Memory": "1.1.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
"Syncfusion.Compression.MVC": "14.2600.0.32-preview2-final",
"Syncfusion.XlsIO.MVC": "14.2600.0.32-preview2-final",
"Microsoft.ApplicationInsights.AspNetCore": "1.0.2",
"Microsoft.Extensions.Configuration.FileExtensions": "1.1.0",
"Microsoft.Extensions.Configuration.Json": "1.1.0",
"Microsoft.Extensions.Logging.Console": "1.1.0",
"Microsoft.Extensions.Logging.Debug": "1.1.0",
"Microsoft.NETCore.App": {
"version": "1.1.0",
"type": "platform"
},
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0"
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
},
"frameworks": {
"netcoreapp1.1": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
//"net461": {
// "dependencies": {
// },
// "imports": "dnxcore50"
//}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"publishOptions": {
"include": [
"wwwroot",
"web.config",
"appsettings.Production.json",
"appsettings.Staging.json",
"appsettings.json"
]
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}
Ich kann nicht herausfinden, was das Problem mit der Konfiguration oder IIS ist.
Edit: Ich habe einige Änderungen an der Konfiguration und bin jetzt nach dem Modul Ladeabschnitt (zumindest nach dem Trace-Protokoll). Jetzt bekomme ich nur 404, wenn ich die Website besuche. Ich kann ohne Probleme statische Bilder sehen, aber wenn ich auf die Homepage auf die Website sehen bekomme ich eine 404-Fehler
ModuleName AspNetCoreModule
Notification EXECUTE_REQUEST_HANDLER
HttpStatus 404
HttpReason Not Found
HttpSubStatus 0
ErrorCode The operation completed successfully. (0x0)
Meine veröffentlichte Verzeichnisstruktur eine Unter Website unter der Stammwebsite in IIS ist (/ Cranalytics). In diesem Ordner befinden sich dann alle DLLs und die Datei web.config. Unter diesem Verzeichnis befindet sich das Verzeichnis wwwroot aus dem Projekt. Die IIS-Unterwebsite wird auf die Stammwebsite (/ Cranalytics) verweisen.
Warum altes IIS-Paket? Aktuelle Version ist http://www.nuget.org/packages/Microsoft.AspNetCore.Server.IISIntegration.Tools/1.1.0-preview4-final – Tseng
Haben Sie auch die 1.1.0 Runtime installiert? –
tseng Ich habe es geändert in 1.1.0-preview4-final Martin Ich habe DotNetCore.1.1.0-WindowsHosting auf dem Server installiert –