This is what I did:
I created a default ASP.NET Web API with the only Values controller. No modification.
I installed all the plugins, libs which you can imagine
I got 503 Service Unavailable
I updated Windows 12R2 with the latest updates and after that I got 500.19 "The requested page cannot be accessed because the related configuration data for the page is invalid." Instead of 503
I modified Configure method in the startup.cs:
public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.Use(async (context, next) => { await next(); if (context.Response.StatusCode == 404 && !Path.HasExtension(context.Request.Path.Value)) { context.Request.Path = "/index.html"; await next(); } }); app.UseHsts(); } app.UseHttpsRedirection(); app.UseCors("CorsPolicy"); app.UseForwardedHeaders(new ForwardedHeadersOptions { ForwardedHeaders = ForwardedHeaders.All }); app.UseStaticFiles(); app.UseMvc(); }
It did not help
I changed the properties of the project, changing IISExpress profile to IIS, played with the different settings for x64, x86 in the deployment settings - nothing helped.
I added
[AspNetCoreHostingModel]InProcess[/AspNetCoreHostingModel]
into the project file and updated deployed web.config where I replaced:[aspNetCore processPath=".\TempTest5.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout"/]
with:
[aspNetCore processPath="dotnet" arguments=".\TempTest5.dll"
stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout"
hostingModel="InProcess" /]
And nothing helped!
Any ideas are welcome