Using dotnet publish, how do I deploy a dotnet core web application to a IIS server hosted remotely? What is the best way to do that?
I am setting up Jenkins for CICD for this app and need this process to be part of this.
I think what you are looking for is MS Web Deploy. This is a Windows tool, that can perform remote deployments to IIS using a CLI command, making it easy to integrate into tools like Bamboo or Jenkins.
In order to use this, you'll need to have 2 services setup and installed on the IIS server.
Once those services are setup and running, you can run the msdeploy.exe (C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe) that comes with MS Web Deploy to execute a application deployment. This can be done from the same server, or from a remote server.
Example:
msdeploy.exe -verb:sync -source:iisApp="$appPath\web" -dest:iisApp='$SiteName',wmsvc="$IIS-Server-Name",UserName='$user',Password='$password',AuthType='Basic',skipAppCreation=true -enableRule:AppOffline -allowUntrusted:true mono msdeploy.exe with the necessary parameters. This should enable certain features (but probably not all).