Angular 14 dotnetcore 6 webapi on iis - not quite there

Viewed 38

As was pointed out to me earlier, I didn't have the hosting model added, which I do now.

In doing the build of the source code: Angular ng build and the output directory is set to /API (the dotnet core 6 project). This makes wwwroot at the top level /API folder - just seems to me, it should be in the API/bin/Release/Net6.0 directory ??? <<what do you think.

In Visual Studio 2019 API (core) directory, I selected Build -> Publish API -> where to: IIS, then selected Web Deploy (? not sure if web deploy package is what I should have done), Server - this machine so "localhost", sitename is TUtil as shown in IISMgr. I left the rest empty. (Not sure what destination URL is for).

Validate Connection button fails with Unable to connect: Service Url should not be empty. ??? Lost where is that.

Thanks advance. Chuck

1 Answers

The Destination URL setting isn't required. When Visual Studio finishes deploying the application, it automatically opens your default browser to this URL. If you don't want the browser to open automatically after deployment, leave this box blank.

This is just a suggestion, you can try uninstalling and reinstalling Web Deploy to fix it, open "Programs and Features", find "Microsoft Web Deploy 3.6", and uninstall it. After uninstalling, open IIS, click on the server node, then open "Web Platform Installer", install "Web Deploy 3.6".

Here are some reference documents from the official:

Installing and Configuring Web Deploy on IIS 8.0 or Later:

https://docs.microsoft.com/en-us/iis/install/installing-publishing-technologies/installing-and-configuring-web-deploy-on-iis-80-or-later

ASP.NET Web Deployment using Visual Studio:

https://docs.microsoft.com/en-us/aspnet/web-forms/overview/deployment/visual-studio-web-deployment/deploying-to-iis

Related