Mustafa Altunok
3 min readNov 23, 2022

Deploying a .NET project to On-Premise Windows Server with Azure DevOps

In our DevOps journey chances are we will be asked to deploy an old project, that is locally and manually maintained, to a remote Window Server IIS with Azure DevOps. This way we will benefit from DevOps culture. Here let’s overview the process step by step.

Step1. First of all we will create a CI pipeline to build the project and create an artifact for release. As this is an old .NET Framework 4.7.2 project with no docker file, the build pipeline tasks will be as follows;

In order to get these tasks we can choose ASP.NET template when creating the pipeline.

Step2. After getting a successful build what we have to do is to create a deployment group. The deployment group installs a deployment agent on target server or servers in the configured group and instructs the release pipeline to gradually deploy the application to the server or all servers that belong to the deployment group.

This step will give us a script to run on remote server. We will login to our remote server with admin credentials, run powershell as admin, paste the script and hit enter.

Enter credentials when prompted. Make sure to start Azure Pipline service on remote server. If everything goes well, we will see the message, saying agent successfully installed and configured, on powershell screen. On our deployment screen we will see that the deployment is online. That is all that straightforward. Now this server is part of our deployment group.

Step3. Now we have a successful build from step 1 and an agent that communicates with our Azure DevOps installed and configured on remote server from step 2, what left is to create a release and deploy our app. At this step we will choose IIS as our release template.

After choosing proper CI artifact, the tasks will be configured as follows;

At IIS Deployment task, make sure to choose the created deployment, the other IIS steps are pretty strightforward. Then we will save and create our release.

Yes, with just three basic steps we kinda modernize our way of maintaining our software project, and make use of the benefits of Azure DevOps.

Thanks for reading…