3
votes

I hope I'm asking this question in the right place. I also asked on umbraco forum, but did not get any response yet.

I'm having problem with deploying my Umbraco 5 website to external hosting.

On local machine, I used Umbraco 5 template for VS2010, which works fine (although it's quite slow).

When I publish to live server I get 500 error.

So far, i've tried installing fresh copy of umbraco on hosting (works fine). I copied config files in hive provider folder (in App_Data), to point umbraco to my hosting database. That does not throw any exceptions yet. Problem starts when I copy views and partial views over - umbraco then finds the template defined in database and tries to load that.

It's worth mentioning that I also copied my project.dll file into bin directory on the server - the reason for that is because I have added new controller which inherits from surfacecontroller (in /Controllers folder).

Please let me know if I'm doing something wrong.

Cheers Sebastian

3
Umbraco 5 was a short lived (only a few months) failure and no longer exists.Doug Chamberlain

3 Answers

2
votes

It is not any different than deploying a MVC3 website. There are quite a few questions with exactly that signature here on so.

Visual studio even has a few tools to help you in the process. The publish function is found right clicking the project in the solution explorer.

If you use the template for developing, you have a working umbraco solution locally right? If that is the case, it is easier to just deploy / publish the entire site intead of copying bits into another umbraco solution.

Publish tool

When using that tool, remember that umbraco has quite a few config files etc. and they all need to be included. So it is probably the easiest to just export all files in the folders, by changing "which files to include" setting in publish tool. That will unfortunately include all your .cs files too, but later they can be filtered out of the publish process. First make it work, then make it awesome :)

The same goes for compilation mode, i have found that release mode sometimes breaks things, so for now just keep it in debug mode. Then later when you have it working, you can change to release mode for a small performance gain.

Stuff to remember

  • include all necessary files
  • change connectionstrings
  • copy databases
  • custom errors, you don't want your visitors to see YSOD's with your internal debugging info.
  • disable tracing and debugging!

After reading this, you should go on and look for other more elaborative resources too.

0
votes

"umbraco then finds the template defined in database and tries to load that" is key point to me

whatever the version you follow the templates and doc types are the backbones of umbraco ( from you website I know that you are aware with above more then me.. but repeating.) I mean you have created new website but there are no relative Templates and Doctype yet you try to use them in views and subviews and that caused the problem.

To do that please create tempalte and doctype same as is in you staging site and this problem will be solved.

Even better kick-start you development with new site only and make replica of that after defining doc-type and templates to your staging.

I hope i can explain my point.

Thanks, Jigar

0
votes

I've had problems in the past deploying Umbraco 5 projects. When you deploy an Umbraco 5 website to a new server and before you switch the website on in IIS, navigate to \App_Data\ClientDependency and delete any XML files that are there. Next, navigate to \App_Data\Umbraco\HiveConfig and delete the ConfigurationCache-*.bin files.

Once you've done that, recycle your Application Pool and start your website.