Reputation: 4250
I am having trouble deploying a ASP.Net Core 2.0 web application via IIS. My application builds and runs through VS but I cannot get the IIS instance to work.
I get the following error message:
HTTP Error 502.5 - Process Failure
Common causes of this issue:
- The application process failed to start
- The application process started but then stopped
- The application process started but failed to listen on the configured port
None of the troubleshooting steps have worked. I do not think the problem is with the application itself as when I run the following through command line:
"C:\Program Files\dotnet\dotnet.exe" C:\inetpub\wwwroot\MyApp\MyApp.dll
The application runs and I can view it at http://localhost:5000/
I have been through all the steps at https://learn.microsoft.com/en-gb/aspnet/core/host-and-deploy/iis/index?tabs=aspnetcore1x#common-errors and still have not made any progress.
This is what my WebHostBuilder method looks like:
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.UseApplicationInsights()
.Build();
host.Run();
and I use the following settings in my Startup.cs:
services.Configure<IISOptions>(options =>
{
options.AutomaticAuthentication = true;
});
Upvotes: 0
Views: 393
Reputation: 1055
That error can be for a number of reasons.
Upvotes: 1