I haven’t post anything yesterday so I think I will post two posts today. This is the first. This actually happens yesterday when I am trying to deploy a web that is using Orchard CMS.
I found that some steps (cheating steps actually) to deploy it easily and quick. I am using FTP publish method from VS 2010.
- Prepare your source code ready. Prepare the FTP server ready too. Create SQL dump statement that contains your web’s database.
- If there are files in the FTP already, back it up.
- Execute your SQL statement in the target database
- Using the given user from the database admin, update the default site to the new environment.
- Change the setting in
~/App_Data/Sites/Default/Settings.txtso that your connection string match the publish environment.
- Set your build to release mode in Visual Studio.
- Configure your publish method to FTP and publish it to the FTP server
- Change all
localhost:portto the new site in your code. ex:
- Publish it
Quite easy and simple steps. Sometimes, there is an error. You can check the log for more details. Log is located at
~/App_Data/Logs/. Error that I meet is that the user given by the DB admin can’t access the database. So I have to ask the DB admin to let the user access it. That’s all.