What tool should I use to automate my deployment of my ASP.NET MVC application?
Asked Answered
P

4

5

I've written a site for my summer internship using ASP.NET MVC. The progress is going well but one thing I have found painful is deployments. Particularly, because we have frequent deployments and I've been doing them by hand.

I'm looking for sort of the "standard" .NET deployment tool that can be utilized with an ASP.NET MVC project to automate our deployment process.

Some things I would like the tool to be able to do (that I do manually now):

  • Set compile mode to "Release"
  • Publish my ASP.NET MVC Web Application project
  • Ensure debug mode = "Off" in my Web Config
  • Change the connection strings for our database from dev db to prod db's info
  • Transfer the Website to the web server
  • Ideally, it would be nice if it stopped the IIS site and replaced the existing site with the new files, then restarted it.

Given sort of these soft requirements, what tool would you suggest I use to tackle this problem? I'm using II7 if it matters.

Photocopier answered 26/7, 2009 at 2:41 Comment(0)
A
6

I would use NAnt. You can have it:

  • Retrieve the code from your source code repository (it has plug-ins for the vast majority of them).
  • It can compile the code either directly or use your solution file and command line options to start vstudio. Look at the command line options and you can tell it to do a rebuild and to change the mode to Release.
  • It has XML commands (XMLPOKE) that will let you easily change the debug mode to off as part of the deployment
  • Copying files is easy (it has lots of ways to do this).

And, you don't need to stop the IIS site. You can simply add an app_offline.htm file (double-check my file name). When the site is hit, this page will automatically display. So have the NAnt script deploy the file as it's first step and remove it as it's last step.

Admonition answered 26/7, 2009 at 3:15 Comment(0)
P
2

This is only supported until VS2010

Check out the Web Deployment Project. It is able to do most of what you request. I used it for the building part of deployment. I am not shure about the copying to iis and restart IIS-part.

Plumlee answered 26/7, 2009 at 17:57 Comment(2)
+1 big fan of this. have been using it for a while with 'great success' :)Proselyte
URL is broken.. @Mathias please update url of Web Deployment ProjectLitre
E
1

Have you taken a look at WebDeploy yet?

Ethban answered 29/12, 2011 at 20:35 Comment(0)
C
0

You can try InstallAce that takes care of most of deployment scenarios of Web Applications including build packaging, Scripting tasks, IIS or SQL tasks, file distribution and server side config files updation.

Ci answered 18/11, 2009 at 8:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.