-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application is running inside IIS process but is not configured to use IIS server. #2
Comments
this issue was reported on Azure functions |
I'm having the exact same issue. |
Also having the same issue, but with publish on Azure Web App Service. |
Do you know solution for this? |
Been a long time but there are a couple of things you could check:
If I remember correctly, Azure killed of my Kestrel config because it only runs IIS and default configuration for any .NET Core project is Kestrel. Something along those lines: .ConfigureWebHostDefaults(webBuilder =>
{
var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");
if (environment == "Development")
{
webBuilder
.UseKestrel()
.ConfigureKestrel(serverOptions =>
{
serverOptions.Limits.MaxRequestBodySize = 10 * 1024;
serverOptions.ConfigureHttpsDefaults(listenOptions =>
{
listenOptions.SslProtocols = SslProtocols.Tls12;
});
})
.UseStartup<Startup>();
}
else
{
webBuilder
.CaptureStartupErrors(true)
.UseSetting("detailedErrors", "true")
.UseStartup<Startup>();
}
}); |
In this project, if it is launched on local host "debug" mode everything works ok. However, after I deploy the project on Azure Function App there is an error when the function call for any web api like this one below:
https://[...].azurewebsites.net/api/Values
The azure function app was created with the default settings and with ASPNETCORE_DETAILEDERRORS = true in order to be able to see the server error.
The stack trace error can be found below:
An error occurred while starting the application.
InvalidOperationException: Application is running inside IIS process but is not configured to use IIS server.
Microsoft.AspNetCore.Server.IIS.Core.IISServerSetupFilter+<>c__DisplayClass2_0.b__0(IApplicationBuilder app)
InvalidOperationException: Application is running inside IIS process but is not configured to use IIS server.
Microsoft.AspNetCore.Server.IIS.Core.IISServerSetupFilter+<>c__DisplayClass2_0.b__0(IApplicationBuilder app)
Microsoft.AspNetCore.HostFilteringStartupFilter+<>c__DisplayClass0_0.b__0(IApplicationBuilder app)
Microsoft.AspNetCore.Hosting.Internal.AutoRequestServicesStartupFilter+<>c__DisplayClass0_0.b__0(IApplicationBuilder builder)
Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
Show raw exception details
System.InvalidOperationException: Application is running inside IIS process but is not configured to use IIS server.
at Microsoft.AspNetCore.Server.IIS.Core.IISServerSetupFilter.<>c__DisplayClass2_0.b__0(IApplicationBuilder app)
at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.b__0(IApplicationBuilder app)
at Microsoft.AspNetCore.Hosting.Internal.AutoRequestServicesStartupFilter.<>c__DisplayClass0_0.b__0(IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
.NET Core 4.6.27317.07 X64 v4.0.0.0 | Microsoft.AspNetCore.Hosting version 2.2.0-rtm-35687 | Microsoft Windows 10.0.14393 | Need help?
The text was updated successfully, but these errors were encountered: