My project Build Successfully by MSBUILD and loaded build file in Shared Artifacts. now how to Canfigure Task for Deployment Download Build files from Artifacts and Transfer my server location and which one best for Asp.net Project like (MSDeploy) or others. please give me sample example.
Assuming IIS, there are 3 components to take care of.
For moving the files, I just use a network share and move stuff over using a filter to remove source code files*. The AppPool can be setup once and forgot in a lot of case but I prefer to keep all the setting in version control along with the application(s) using it; in our case almost every application has it's own AppPool so it is easy to manage. The WebApplication is telling IIS that have more than .html/images/css and typically want the Asp.netengine, you can also setup bindings there. So onto the how, I use powershell. Powershell scripts are added to the version control of the application and has some easy access to IIS control via the WebAdmistration module and since by AppPool only have one application I can easily deleted them and push new ones with the version controlled.
$appName = "YourApplicationName" Import-Module WebAdministration if (Test-Path "IIS:\AppPools\$appName") { Remove-WebAppPool $appName } if (Get-WebApplication -Name $appName) { Remove-WebApplication -Name $appName -Site "Default Web Site" } # Redacted copying files over $appPool = New-WebAppPool $appName # Redacted user information $appPool.processModel.userName = $user $appPool.processModel.password = $password $appPool.processModel.identityType = 3 $appPool.managedRuntimeVersion = "v4.0" $appPool | Set-Item New-WebApplication -Name $appName -Site "Default Web Site" -PhysicalPath "C:\inetpub\wwwroot\$appName" -ApplicationPool $appName
I removed our file copying to keep it pertinent and user information for obvious reasons but powershell can access some Marshall operations really easily and safely store passwords for you on the target machine(s).
*Wanted to show the script then explain, we move other everyone but source code so including the install script to the target machine in a temp folder then execute the install script locally on the target machine. We've been plagued with file copying issues and downtime latencies which were solved with that approach.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.