green field

Deployment

Whether using VS 2005 or VS 2008, I highly recommend the free tool Unleash It for deployment. It deploys just the typ of files you configure and is ideal for packaging a set of compiled files for xcopy deployment on a server without unnecessarily including C# source code or solution and project files.

Be sure and do a Release Rebuild of the solution then open Unleash It and browse to the web folder under the solution for the source folder and browse to a destination folder of your choosing.

 

You can adjust the files that it includes in the deployment by clicking the little red check mark next to the dropdown that says Quick Deploy Profile.
 

In addition to the defaults, you need to add masks for
*.html
*.asmx
*.ashx
*.xml
*.xsl
*.master
*.skin
*.xsd
*.browser
*.skin
*.theme
*.png
*.ico
*.resx


I alway deploy first to a local folder in order to do some additional cleanup before deploying to production. My cleanup steps are as follows:

  1. Open the Web.config file with a text editor and change near the bottom, change <compilation debug=true to false. This is for best performance on production servers.
  2. Look in Data folder and delete currentlog.config and test.config files, these will be re-created as needed so best not to deploy them.
  3. Look in Data/Sites/1 and delete test.config
  4. Look in Data/Sites/1/systemfiles and delete any files in there. These are temporary files that will be created on the server so they should not be deployed from your dev machine.
  5. Delete the obj folder under the root of the web

 

Now the files are ready to copy to the production server

Note that I do not recommend populating your database on one machine and then moving it to another machine. It can be done by restoring a db onto another machine but if your relative urls have changed then you will have problems with broken links. Better to use a different db for development than for production. Create production content and pages right on the production machine not on development. So, in other words after deploying your build on production for the first time, then visit /Setup/Default.aspx to complete the installation same as you did on development. If you need your devewlopment db to be the same as production then periodically get a backup from production and restore it on your dev machine. Creating data on your development machine and then trying to move it to production will lead you to more difficulty.  You will especially have trouble if your development url is a virtual directory like http://localhost/mojoportal and your produciton environment is a root web site like http://www.somesite.com. Save yourself some grief and follow my advice on this.

 

mojoPortal Wins the 2007 Open Source CMS Awards Best Non-PHP Open Source CMS Donate Money to support the mojoPortal Project. Join the mojoPortal Group on Facebook Join the mojoPortal Group on LinkedIn View Joe Audette's profile on LinkedIn View Joe Audette's profile on The Guild of Accessible Web Designers site mojoPortal can run on GNU/Linux using Mono