Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setup for ASP.NET web application

We have some ASP.NET web application which used in 2 ways:

  • enterprise solution (msi-like installer)
  • cloud solution (use same installer)

Currently we use home-grown installer, but consider if we can replace it with something more convenient and suitable for CI/CD development cycle.

What technologies/products can be used? Currently I think about webdeploy, but not sure how it can be applied for enterprise setup...

like image 304
Sergey Azarkevich Avatar asked Mar 20 '17 08:03

Sergey Azarkevich


People also ask

How can I host my ASP.NET website locally?

First open your ASP.Net web application in Visual Studio. Now in the top we have the option Build. Click on that and under Build you will find Publish Website. Click on Publish Website.


1 Answers

This is quite a broad question, but I think it deserves an answer.

1. (partially) Open source solution

One way to configure CI cycle is to use Jenkins along with MS deployment functionality. This article shows how to quickly set up a job to integrate Jenkins with msdeploy tool.

Basically it configures a job to perform the deployment using Powershell:

msdeploy.exe -allowUntrusted=true -verb:sync -source:contentpath='D:\WS\ExampleProject' -dest:contentpath=F:\webfolder,computerName=exampleproject.example.com,Username='yourdomain\username',Password='password' -skip:objectName=dirPath,absolutePath="config" -skip:objectName=filePath,absolutePath="web.config"

It also tells that the executing user should be an administrator on target server, but this can be circumvented through proper configuration of Web Deployment Handler as indicated in this article.

One intermediary step that can be done before Jenkins integration (which I recommend) is to configure Web deployment. This allows to quickly check that deployment can be performed onto target server IIS using Visual Studio and any configured user that is allowed to deploy. It also allows to quickly see the difference between current code base (web pages, JS files, binaries) and target server deployed package.

2. Visual Studio 2017 DevOps solution

Microsoft recently released VS 2017 which contains a great support for DevOps which handles most the issues related to CI/CD. I cannot find a reference, but I remember that this feature is available for Enterprise version only. Also, the good news is that it is not tightened to Microsoft technologies.

A presentation related to the subject can be found here.

I think WebDeploy can be used without significant problems. From my experience with it:

  • backup limitation: can be done only at Web Site level, not Web application level
  • deployment time: is quite small - actual files copy + Web site backup (if configured) + application pool recycle.
like image 179
Alexei - check Codidact Avatar answered Nov 15 '22 17:11

Alexei - check Codidact