0

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;
});
4

1 Answer 1

1

That error can be for a number of reasons.

  1. On you IIS server have you installed the .Net Core Runtime?
  2. Is your application pool configured correctly?
  3. Are your site bindings correct? enter image description here
  4. Check the install runtimes on your computer are the same you are trying to run on the projectenter image description here
Sign up to request clarification or add additional context in comments.

4 Comments

I'm deploying to my local machine (as a test before deployment to the server) so it has the runtime, the application pool is set to "No Managed Code" per the guide. What should the bindings be? Do they have to be any different from a standard .Net site?
I'm away from my machine right now, will have a look tomorrow. Thanks for all the help.
It's a bindings issue after all. I tried removing the default website from my machine and blanking the binding and the site works at localhost/ Do you know how I can get it to work at another address?
Found it, had the entry in the host file commented out - very frustrating. Thanks for the help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.