0

I can't get my IIS site to run and I've tried most of the solutions I've seen. I started with a clean IIS server for testing this. If I try to access via the DNS name I get a 503. If instead I get on the webserver and run dotnet path\to\app.dll it starts without issue, and I can then curl localhost:5000/weatherforecast and get back the default JSON. So the app itself is clearly fine and working, it's something in the IIS config. Here's what I did:

  1. Installed the .NET Core Hosting Bundle on my Windows Server 2019 system, then rebooted.
  2. Ran Computer Management and in System Tools -> Local Users and Group -> Groups I added the domain account to both Users and IIS_IUSRS groups.
  3. In IIS Manager I created a new site and set the binding to my DNS name on port 80.
  4. Set the application pool for that new site to No Managed Code for the CLR version and set the identity to the domain account.
  5. Created a default VS 2019 ASP.NET Core API, set the target framework to .NET 5.0
  6. Published, via a Folder Profile, with a target framework of net5.0 and a runtime of win-x64.
  7. Restarted the IIS site then went to http://my.domain.name/weatherforecast and got a 503.

I'm not even remotely close to being an IIS administrator, so at this point I don't know how to further debug the issue.

Gargoyle
  • 9,590
  • 16
  • 80
  • 145
  • https://stackoverflow.com/q/13322937/14874039 This post may help. – TharinduSK Feb 19 '21 at 05:43
  • Unfortunately none of those solutions made any difference. – Gargoyle Feb 19 '21 at 07:24
  • Does the error message is "Service unavailable"? You can create a new application pool and run again. It is possible that an unknown problem has occurred in the original application pool. In this case, creating a new application pool is the simplest solution. – Bruce Zhang Feb 19 '21 at 09:15

0 Answers0