Replanting the Orchard

I decided to wipe my old Orchard v1.3 install and replace it with the latest and greatest v1.9 release. It looks like a lot has changed, all good things I’m sure!  My hosting provided (Arvixe) has the option of installing Orchard from the application gallery which I’m sure would work out just fine.  However I want to start playing with the Orchard source code and have a local build working which I can use to experiment with and then push changes to production.  With that in mind my goal was to get the Orchard source code, build and run it locally, and then deploy it to my hosting space at Arvixe.

This should have been simple, however it quickly turned into a multi-hour exercise as I proceeded to troubleshoot issue after issue.  In case anyone else is trying to do this, here’s the steps I eventually took to get this all working.

  1. Create new (sub)domain and associated website
  2. Edit website settings and set to ASP.net 4.0 (integrated) then Update
  3. Enable web publishing, then download the publish profile
  4. Open Orchard source code in VS2013, build the solution
  5. Publish the website using the downloaded publish profile (might take some time for the initial upload as it’s ~60MB)
  6. Use the Arvixe control panel file manager to access the wwwroot folder for the website and ensure the App_Data folder exists (create it if needed)
  7. Assign Write and Delete permissions to the App_Data folder, files and subfolders
  8. Assign Write and Delete permissions to the Media folder, files and subfolders
  9. If you want to allow install of themes and modules, you need to enable write access to Modules and Themes folders too
  10. Create a new SQL DB and user/password for use by the new website
  11. Load the website and perform setup, using the DB settings from the previous step


Troubleshooting

Here are some things that went wrong, and what I did to fix them

Problem: Using IE11, I was unable to sign-in to the Orchard dashboard.  If I entered incorrect credentials I got a nice error message, but if I entered correct credentials the page simply reloaded with no error message.
Solution: It turns out this is an issue with IE11 and cookies, possibly from a previous version of Orchard (I has v1.3 installed at the same domain prior to this install). To fix it, navigate to the Orchard website, hit dev tools in IE11 (F12), select the Network tab, and then clear all the cookies for the domain.

Problem: I needed to know the DB connection string
Solution: Data Source=localhost;initial catalog=your_db_name;User ID=your_db_user;Password=your_db_user_password;persist security info=True

Problem: The first time I started the production website up I was getting an application start error.
Solution: Turns out my publish step from VS2013 had also included the contents of the local App_Data folder.  So Orchard thought it had already been setup.  To fix this, I simply deleted the entire contents of App_Data on the server, recycled the app pool, and then went through setup using the production setting.


2323 Comments