Does publishing via FTP work?

Topics: Installing Orchard
Oct 26, 2012 at 10:38 PM

The web application Orchard.Web of the source code works fine in either release or debug mode in VS2010. 

Publishng the debug version which includes a lot of files seems to work fine, but publishing the release version does not work.  It generates 4 folders on the server: App_Data, bin, Config, Media.  Media folder is essentially empty, and App_Data does not have subfolder Sites. 

I am quite sure that it would work if I just copied the entire folder of Orchard.Web to the server. 

Can I use any of the VS2010 publish options to push it to the server?  I probably miss some fundamental understanding of Orchard. Could anyone shed some light on this?


Oct 27, 2012 at 12:05 AM

Oct 27, 2012 at 9:37 AM

Thanks for the pointer.  The instructions seem to be for deploying a new instance of Orchard.  They do give me some sene about how to take care of deploying an existing instance that have been customized and with a lot of contents.

It may be easier to just copy the whole thing except the obj folder though it will be 800+ MB larger.  


Oct 29, 2012 at 7:02 PM

Well, if it's contents you need to deploy, you can use import/export. Migrating the whole database is a possibility as well, but if it's an existing site and you have user-created contents such as comments that's out of the question.

Nov 1, 2012 at 3:58 PM

I have always had problem with publishing to shared hosts of cms projects overall. Don´t exactly know what the problem is even...

For example im trying to deploy to this shared host, using the "Private account"(Privat konto)

If you scroll down a bit on that page and check on " Tekniska Specifikationer" = Technical Specifications you will see it´s a decent host for that price.

This time I deployed a working copy to a azurewebsite, downloaded it, installed some modules, copied a theme etc. everything works there.

Proof it work´s:

Then tried to publish it to Binero through ftp, used a Orchard.sdf DB in App_data folder, opened the rights for that folder so it would be writable for all users.

Result is here... 

So what dependency am I missing?

Or what should I'll do to fix this?

Nov 1, 2012 at 7:07 PM

Did you download the latest log file? Maybe there's a hint there. Usually when I see a 404 it's because Orchard couldn't connect to the database. Or there's another problem that happens early on in the request, causing a 404. Log files usually contain useful information to find out what exactly.

Nov 1, 2012 at 7:20 PM
Edited Nov 1, 2012 at 7:20 PM

I just want to report my own experience: I have given up on publishing an instance of Orchard via FTP within Visual Studio.  My understanding is that it is not meant to be published in that way. I failed even after including all kinds of folders in the Orchard.Web project.

If you publish (i.e. copy to the server) an Orchard site that works locally via FTP outside Visual Studio, it should work.  That is essentially what I did to make it work.

Nov 3, 2012 at 6:12 AM

Sure, FTP works but in general it's a shitty protocol to upload lots of files. Most hosting plans support WebDeploy, which is a million times more robust for this sort of thing. I highly recommend you give it a try.

Marked as answer by zipswich on 10/23/2013 at 11:24 AM
Nov 5, 2012 at 8:09 AM

Hi, installed win 8 pro this weekend and updated my bios when the graphic card didn´t responden to the new updates. That resulted in a total shutdown fo my computer, but now im'm back!


Sfmskywaleker: Thank you! Ill try to find the log which I´ve didnt even know it existed in orchard. :P And then I come back if I still got problems.


Zipswich: other simpler projects I have always published my VS project to folder, and then used filezilla FTP to my shared host, that works normally ok for me.

And that´s what I tried with orchard too... but it didn´t work for me...


Bertrandleroy: Thank you! Ill check that out, haven´t used webdeploy/publish since 2.0 era... :P

Nov 5, 2012 at 12:03 PM

Seems lika problem with creating the DB. Should I remove it completley now in the beginning maybe?


Orchard.Environment.DefaultOrchardHost - A tenant could not be started: DefaultNHibernate.HibernateException: Could not create the driver from Orchard.Data.Providers.SqlCeDataServicesProvider+OrchardSqlServerCeDriver, Orchard.Framework, Version=, Culture=neutral, PublicKeyToken=null. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)   at System.Data.SqlServerCe.UnmanagedLibraryHelper..ctor(String fileName)   at System.Data.SqlServerCe.NativeMethodsHelper..ctor(String modulePath)   at System.Data.SqlServerCe.NativeMethods.LoadValidLibrary(String modulePath)   at System.Data.SqlServerCe.NativeMethods.LoadNativeBinariesFromPrivateFolder(String privateInstall)   at System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries()   at System.Data.SqlServerCe.SqlCeCommand..ctor()   --- End of inner exception stack trace ---

Nov 5, 2012 at 2:48 PM

Solved it by unlocking the appdata folder through ftp. So now is the public rights, read, use and write... dosen´t feel real safe. Which one should I try to lock? Read possibility maybe?

Nov 5, 2012 at 10:21 PM

I use FTP to publish some of my VS projects form VS too, and they work fine.  As my understanding, Orchard is meant to be published from VS. 

Nov 5, 2012 at 10:48 PM

You need app_data to be writable, yes. What's your concern exactly?

Nov 6, 2012 at 11:50 AM

bertrandleroy: So everything in app_data should be writable, readable and drivable?

my biggest concern is that only works when i enable "folder_listing" through the provider. And these combos with folder_listing... is that really safe for a site with community members?

Is it some kind of possible to list for example all members, their passwords and info when the app_data folder is so unlocked? Im pretty new at this...

Nov 6, 2012 at 11:13 PM

Yes, and there is no security risk as the files in there will never get served.

Now folder listing, *that* is a security risk. You should never allow that on a production site that contains anything but static contents. I don't know why that is needed, but you may want to separate that into a different site.

Nov 7, 2012 at 12:21 PM

Intresting that the CMS only works on this shared host with folder listing activated... 

Nov 7, 2012 at 1:32 PM
MichaelR80 wrote:

Intresting that the CMS only works on this shared host with folder listing activated... 

So weird... suddenly it works without folderlisting. :P