Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to deploy a .NET application on IIS

Ioustinos November 4, 2012

Hi there,

I have donwloaded and set up Bamboo on my server. I have managed to pull the code from SVN, build it with MSBuild and tested it ith NUnit. All works fine, now I need to deploy but i cannot.

There were no Deploy options, so I installed the SCP plugin, however I cannot connect to our IIS server as it does not accept SSH connections

What can I do to deploy to our IIS server?

Thank you

5 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

5 votes
tc-mossridge September 11, 2013
  1. Install Microsoft Web Deployment tool and add a deployment package to your solution
  2. Run MSBuild task with the following Options, specifying the relevant build configuration: "/p:CreatePackageOnPublish=true /p:DeployOnBuild=true /p:Configuration=Release"
  3. Capture three artifacts from the build, found under "SolutionDirectory/obj/<BuildConfiguration>/Package/": "ProjectName.deploy.cmd", "ProjectName.SetParameters.xml", "ProjectName.zip"
  4. Run the ProjectName.deploy.cmd file from a script task in the deployment project with the following Argument: "/y /m:<remote IIS hostname> /u:<remote admin user on IIS host> /p:<remote user password>"
Austin McDaniel January 9, 2014

@Tom Cassidy - I try to run the ProjectName.deploy.cmd it says it can not find the file ... Do you need to specify the paths?

tc-mossridge January 12, 2014

Do you have the correct name for your .cmd file? Did you capture it as an artifact correctly? Nothing else I can suggest.

Deleted user October 13, 2014

Running MSbuild with the switches from step 2 does not create the package. Is there something I need to do in the solution (I.e., what is the breakdown for step 1)?

ajaybhasy February 17, 2016

@Tom Cassidy When I do this the deployment hangs in the Step where we call the CMD file. It doesnt throw an error but goes on running.

Sagar Pawar August 9, 2016

This works for me.

I found all artifacts from build inside Project name \obj\Release\Package folder.

 

Thanks a lot Tom smile

Yogesh Mude December 15, 2017

HI @tc-mossridge

For creating the artifact for .Net web application what copy pattern and location and What MSBuild Options i need to provide.

Fr0zt June 29, 2018

Hello.

We are already in 2018... Can you tell me if is there a better solution to deploy a .net application to IIS or this solution is still the one?

Like Justin Novack likes this
Justin Novack May 7, 2019

Hello 2018, I'm from the Future, in 2019.  I regret to inform you that it, in fact, does not get better.

Like # people like this
5 votes
Dejan Vasic March 19, 2013

After playing a very short while with Bamboo there seems to be a major lacking in .Net deployment ability.

The Microsoft Web Deployment Tool only solves one problem : WEB !!! What about Windows Services? Console applications that are run by windows task scheduler? Databases upgrades? How does it handle rollbacks during failed deployment?

My approach at the moment would be to start writing a whole bunch of powershell scripts that do all of this but I would have thought that Bamboo touting itself as a "build and deploy" solution should have already taken care of a lot of this.

Octopus Deploy is a "Deployment Solution" and integrates very nicely with team city. Bamboo so far I can see is only a team city replacement for a build server. A major feature of any deployment product is to manage environments (including target machines) in one place and then manage packages and their versions and I cannot see bamboo doing this well at the moment. Not for .Net anyway.

0 votes
Austin McDaniel January 9, 2014

@Tom Cassidy - I try to run the ProjectName.deploy.cmd it says it can not find the file ... Do you need to specify the paths?

Sagar Pawar December 19, 2017

Yes. you need to prepend Build Directory path  to ProjectName.deploy.cmd

-${bamboo.build.working.directory}\ProjectName.deploy.cmd

0 votes
Devandrew September 10, 2013

I encountered this exact problem about 3 months ago, although I've just seen this post!

We opted for a tool from Redgate called Deployment Manager. It was a toss up between Octopus and Redgate. They both work in a similar way From what I can tell in that they manage environments and then push packages out to target machines. They also both seem to require you to spend a bit of time messing around with PowerShell. In the end we picked Redgate over Octopus because we also need to deploy DB changes.

Dejan Vasic September 11, 2013

Hi Devandrew,

Red-Gate actually purchased Octopus Deploy:
http://www.red-gate.com/delivery/deployment-manager/octopus-deploy

The reason why I chose octopus is because of their transparency in new features they are developing:
https://trello.com/#octopus

Octopus is also cheaper at $799 for an enterprise license.

And it can do Database deploys:
http://octopusdeploy.com/blog/howto/deploy-a-sql-database

I have actually used both DbUp strategy and a Database Project (dacpac) strategy to deploy databases :) and it works a charm.

In the end there's nothing here that can't be done by red-gate deploy, but Bamboo is still out of the question for us unfortunately. And Microsoft's Azure is just too damn expensive in my opinion.

0 votes
James Dumay
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 4, 2012

Take a look at the Microsoft Web Deployment tool. This tool can be called from a Bamboo script task.

Ioustinos November 19, 2012

How would a run a Bamboo script task though? I could not figure this out.

Generally i hustled a lot with the Web Deployment tool and could not find a proper tutorial to take me through installing the web deployment tool and using it properly with Bamboo

Jonathon Stierman December 17, 2012

We're looking at doing the same kind of process. For all the built-in .NET support in the build process (msbuild + unit tests tasks, etc), I was surprised that there wasn't *any* baked in tasks for msdeploy. Is there any particular reason Atlassian hasn't released any msdeploy plug-ins?

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events