This project is read-only.

Deploying Orchard in a Web Server

Topics: Administration, Core, General, Installing Orchard, Troubleshooting
Nov 22, 2012 at 5:07 AM

hi guys, after fixing errors on my orchard site, this error finally came out after clicking Finish Setup:


"Setup failed: An exception was thrown while invoking the constructor 'Void .ctor(Orchard.Environment.Configuration.ShellSettings, Orchard.Data.ISessionFactoryHolder)' on type 'SqlCeCommandInterpreter'."

I followed what i read in other discussions to set all the permissions in the bin, App_Data, Module, and Themes but still no luck. Any suggestions on how to fix this???

Nov 22, 2012 at 7:48 PM

Delete app_data and start over.

Dec 10, 2012 at 10:48 PM

I have run into the same error, cannot find a way to fix this. I am running at a hosting provider in a shared environment, so limited access to the machine. On a similar setup at the same ISP I have been running Orchard 1.4 without issues for over a year now. I have tried clearing and removing app_data, have set read/write access to the entire site structure, re-downloaded the ZIP and re-uploaded it through FTP, but all to no avail. I am trying to run Orchard with the built-in data storage option (SQL Server Compact), which does work for 1.4 as mentioned. This is a fresh site, no previous data, I have not packaged any modules.

What I did do is re-compile log4net.dll with the added [assembly: System.Security.SecurityRules(System.Security.SecurityRuleSet.Level1)] directive (see here) to get it to work on this environment, but log4net is working: I have changed level to "info" and get about 135 kB of Orchard configuring itself.

Any and all suggestions welcome!

Dec 14, 2012 at 2:45 AM

Are you sure that IIS is configured to run .net 4.0 in integrated mode and in full trust?

Dec 14, 2012 at 1:41 PM

.NET 4.0 integrated mode: yes, full trust: not sure, given the fact that it is a shared environment ISP: probably not.

Will try to install a copy of the 1.4 version site that works on the other (supposedly similar) environment to see if there are configuration differences between the 2, will report back.

Dec 17, 2012 at 4:41 AM

make sure your app pool identity has write access to the App_Data folder.

Dec 18, 2012 at 8:37 PM

Confirmed .NET 4.0, and I was able to install an existing 1.4 site on this environment by simply FTPing it over. Write access was set on all necessary folders. Is there any way to get at the underlying exception for "Setup failed: An exception was thrown while invoking the constructor 'Void .ctor(Orchard.Environment.Configuration.ShellSettings, Orchard.Data.ISessionFactoryHolder)' on type 'SqlCeCommandInterpreter'."? It is not in the log file.

Dec 18, 2012 at 9:43 PM

What about full trust?

Jan 3, 2013 at 1:24 PM


I'm getting this error as well when creating a fresh site using built-in storage. The app pool identity has full access to the App_Data directory and is in integrated mode. The site also has full trust. 

Jan 3, 2013 at 2:14 PM
Edited Jan 3, 2013 at 2:28 PM

Hmm, it seems that it can't load System.Data.SqlServerCe, although I do have SQL Server Compact installed. It does, however, work when I run the non-Azure solution.

Jan 3, 2013 at 11:59 PM

You shouldn't need to install Sql Server Compact on the web server. It should be bin deployable as far as I know.

I have successfully setup an Orchard site using Sql Server CE bin deployed (granted it is Orchard v1.3.9).

If you have installed Sql Server CE on the web server then maybe the bin deployed version is conflicting with the version in the GAC.

Jan 4, 2013 at 8:57 AM

Sorry, I should have mentioned that this is on my local machine. However, I'm thinking it's not a good idea to use built-in storage when using developing for Azure, as it will just re-create the database each time I run it right?

Apr 15, 2013 at 4:21 PM
I faced this problem as well and it was gone after application pool is enabled for 32-bit applications.
May 24, 2013 at 9:19 PM
On some servers I've seen this error since upgrading to Orchard 1.6. I don't know if it's specifically related to 1.6 but the problem was resolved when I installed SQL Server Compact Runtime 4.0 on the server (SSCERuntime_x64-ENU.exe)

Weird because on the same server running our product on orchard 1.3 we had no issues with SQL CE
May 26, 2013 at 6:53 AM
Interesting. I think I can explain that. When Microsoft designed .net, they made a horrible mistake, that we are still paying for, to this day: they made the GAC take precedence over local copies of dlls. So if you deploy Orchard to a server that doesn't have SQL CE installed, everything will be fine because the local copy will get used. Now if the server has CE installed, there will be another copy in the GAC. If that copy is the same version, you're fine, but if it's a different version, it will take precedence over the local copy and fail.
Unfortunately there is nothing that Orchard itself can do about it. Your workarounds are to uninstall CE from the server, or make sure it is a version that is consistent with the one that comes with Orchard.
Aug 6, 2013 at 5:15 PM
I've tried following all the suggesions outlined here but with no luck. Installed SQL CE still failed, removed SQL CE still failed. Full trust, security is turned on for app folder, 32 bit applicationf or app pool. None of the suggestions seem to fix this issue for me currently.
Aug 6, 2013 at 7:15 PM
What error message are you getting now?
Aug 6, 2013 at 7:32 PM
It is the same error message as before:

Setup failed: An exception was thrown while invoking the constructor 'Void .ctor(Orchard.Environment.Configuration.ShellSettings, Orchard.Data.ISessionFactoryHolder)' on type 'SqlCeCommandInterpreter'.

The error I've received stays the same no matter what I've tried. I've yet to receive another error message.

If you even want access to the virtual server to check it out Bertrand let me know and I would be happy to give you this information.
Aug 6, 2013 at 7:40 PM
Unfortunately I don't have enough time to go into your server. I'm sorry, I don't know what can be causing this if you have already followed the previous advice. Maybe the SQL CE people would have an idea.
Aug 6, 2013 at 8:10 PM
Do you know of a way to get a more detailed error message from SQL Azure? I'm not seeing the error log.
Aug 6, 2013 at 9:05 PM
Oh, so this is on Azure cloud services, not Azure Web Sites? SQL CE is not supported on those as far as I know. You need to use SQL Azure there.
Aug 6, 2013 at 9:20 PM
Sorry I meant in my previous email a way to get a moer detailed error message from Orchard hosted in an azure service. But yes this is being ran as an Azure cloud service.

Why does SQL CE not work for the Azure cloud service?? Any workarounds?
Aug 6, 2013 at 11:03 PM
Because SQL CE works with the local file system, which in Azure cloud services can be wiped out at any time. Workaround is to use SQL Azure.