'Deploy multi-project .Net Core App to Windows server

I acknowledge this is a noob question, but it is the first time we have had to deploy a multi-project .Net Core Web App to an IIS server and it's causing problems.

Solution consists of four projects:

  • App.Web - primary startup project. Standard .Net Core MVC web app
  • App.Data - primary data project
  • Shared.Data
  • Hmrc.Data

We want to install it to a Windows 2019 server running IIS. I have installed the .Net Core Hosting Bundle and have shared a folder on the server to publish to. I have created the website in IIS and set the pool config.

I set the publish profile on the .Web project to the target shared folder on my IIS server, and repeat for the other three .Data projects.

Publishing appears to complete perfectly, and I have separately deployed the databases to another DB server (having updated the connection strings in the appsettings.json file). Once publishing completes, I can browse to the http://target-server/appname index page, but any page which has a requirement to hit the DB's is failing.

Am I missing anything obvious? Can't see any permission issues on the SQL end.

Any pointers very welcome!



Solution 1:[1]

Ok, this one needs to never be seen again. Entirely my fault and boiled down to an issue in a connection string that I just couldn't see.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 SiStone