This project is read-only.

Some questions on Orchard's abilities

Topics: General
Jun 26, 2011 at 11:28 PM


I am evaluating Orchard CMS and I was wondering on the following:


-Can I implement web user controls onto a page, which use external controls e.g. Telerik? Would this be a widget?

-Can I define the above (additional widgets) in the VS2010 project (I open the orchard site as a website in VS2010).

-How well does Orchard work with source control?

-What is the roadmap?

-Is there a command line tool to do things like upload documents?

-Related to the above, I would like to upload documents and then have a list on the site where each can be downloaded. How hard would that be?

Apologies for all the questions, I am new to Orchard and learning the system!


Jun 27, 2011 at 11:13 PM

WebControls are for WebForms. Orchard is built on ASP.NET MVC, which does not use web controls. In Orchard, the closest thing is shapes. Widgets are yet another thing: content that can be placed in pre-defined zones (in WebForms the closest equivalent would be WebParts, but Orchard widgets are considerably simpler).

You can build anything in Orchard with VS, or with any text editor.

We all use source control (Mercurial).

We are currently finishing the roadmap for 2.0 which should be available early 2012.

We have a command line tool that is extensible.

A list of documents should be relatively easy to build, depending on what your expectations are.

Jun 29, 2011 at 10:04 PM



Thanks for the reply.


What I meant by the source control question is if there any issues with Orchard/source control (any folders to not check in? etc).


Is there any documentation on the command line tool? I want to upload documents to my site. Also, how does migration of content from local (my dev) to staging or production work?


Finally, I edited the css file for my theme, which now includes a background-image in the body, but this does not appear on the site (which is using the modified theme). What do I need to do on the page?



Jun 29, 2011 at 10:09 PM

The usual, don't check-in built binaries or database files, that sort of thing. for commands.

For your css and image, I'd bet on a missing web.config in the folder where they are. Look for other similar folders in the application.

Jun 30, 2011 at 9:14 PM


The command line tool does not seem to support uploading docs. So I need to write custom code to do this it seems, but what would the code do? A database table insert? Please advise.


Lastly, for the theme there is a web.config but it is very short and nothing of interest in there. What am I missing? Is there a tutorial on what I am trying to do?



Jun 30, 2011 at 9:22 PM

Not really, you can execute a recipe, and a recipe can import any contents.

I'm not talking about the web.config at the root of your theme: you should have one in the directories where you have contents that must be served directly. Look into any Content or Scripts directory to see an example of what you need.

Jun 30, 2011 at 10:45 PM


I am following this article to perform restyling (, and when I run the command:


codegen theme MyTheme /BasedOn:TheThemeMachine

But I get this message:

No command found matching arguments "codegen theme MyThe". Commands available: s
ite setting set baseurl,theme list,theme activate,layer create,widget create,men
uitem create,blog create,blog import,feature list,feature enable,feature disable
,package create,package install,package uninstall,page create,recipes harvest,re
cipes execute,user create,warmup generate,cultures list,cultures get site cultur
e,cultures set site culture,help commands,help.

What am I doing wrong?
Jun 30, 2011 at 10:48 PM

That's because you didn't install or enable the code generation feature.

Jul 5, 2011 at 9:14 PM
Edited Jul 5, 2011 at 11:23 PM


My mistake, I installed the feature now.

But I still have problems. When I run this command:

orchard.exe codegen theme MyTheme /BasedOn:TheThemeMachine /CreateProject:true /IncludeInSolution


I get an exception (Below), but the folder etc is still created in the VS2010 solution. What is up with that? I can thenle follow the tutorial for creating my own theme ( but when I go to select the theme from the Orchard dashboard it says "theme not available"?

String was not recognized as a valid Boolean.

Exception Details: System.FormatException: String was not recognized as a valid

Stack Trace:

[FormatException: String was not recognized as a valid Boolean.]
   at System.Boolean.Parse(String value)
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvi
er provider)
   at Orchard.Commands.DefaultOrchardCommandHandler.SetSwitchValue(KeyValuePair
2 commandSwitch) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Commands\D
faultOrchardCommandHandler.cs:line 42

[InvalidOperationException: Error converting value "(empty)" to "System.Boolean
 for switch "IncludeInSolution"]
   at Orchard.Commands.DefaultOrchardCommandHandler.SetSwitchValue(KeyValuePair
2 commandSwitch) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Commands\D
faultOrchardCommandHandler.cs:line 49
   at Orchard.Commands.DefaultOrchardCommandHandler.SetSwitchValues(CommandCont
xt context) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Commands\Defaul
OrchardCommandHandler.cs:line 24
   at Orchard.Commands.DefaultOrchardCommandHandler.Execute(CommandContext cont
xt) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Commands\DefaultOrchard
ommandHandler.cs:line 18
   at Orchard.Commands.CommandHostAgent.RunCommand(TextReader input, TextWriter
output, String tenant, String[] args, Dictionary`2 switches) in d:\TeamCity\Pro
ects\Orchard-Default\src\Orchard\Commands\CommandHostAgent.cs:line 112

If I take out the switches, the command works though. What is wrong?



Jul 5, 2011 at 11:31 PM

Remove the /IncludeInSolution flag (it should have :true after it but actually true is the defgault so you can remove it).

Jul 7, 2011 at 9:23 PM



I did that and got this exception now:


Initializing Orchard session. (This might take a few seconds...)

Error starting up Orchard command line host

Access to the database file is not allowed. [ 1884,File name = c:\inetpub\wwwroot\orchardplaygroundsdev\App_Data\Sites\Default\Orchard.sdf,SeCreateFile ]

Exception Details: System.Data.SqlServerCe.SqlCeException: Access to the database file is not allowed. [ 1884,File name = c:\inetpub\wwwroot\orchardplaygroundsdev\App_Data\Sites\Default\Orchard.sdf,SeCreateFile ]

Stack Trace:

[SqlCeException: Access to the database file is not allowed. [ 1884,File name = c:\inetpub\wwwroot\orchardplaygroundsdev\App_Data\Sites\Default\Orchard.sdf,SeCreateFile ]]
   at System.Data.SqlServerCe.SqlCeConnection.ProcessResults(Int32 hr)
   at System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent)
   at System.Data.SqlServerCe.SqlCeConnection.Open()
   at NHibernate.Connection.DriverConnectionProvider.GetConnection()
   at NHibernate.Tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.Prepare()
   at NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.GetReservedWords(Dialect dialect, IConnectionHelper connectionHelper)
   at NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.Update(ISessionFactory sessionFactory)
   at NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings, EventListeners listeners)
   at NHibernate.Cfg.Configuration.BuildSessionFactory()
   at Orchard.Data.SessionFactoryHolder.GetSessionFactory() in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Data\SessionFactoryHolder.cs:line 53
   at Orchard.Data.SessionLocator.For(Type entityType) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Data\SessionLocator.cs:line 29
   at Orchard.Data.Repository`1.get_Table() in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Data\Repository.cs:line 30
   at Orchard.Data.Repository`1.Fetch(Expression`1 predicate) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Data\Repository.cs:line 126
   at Orchard.Data.Repository`1.Get(Expression`1 predicate) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Data\Repository.cs:line 91
   at Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetDescriptorRecord() in d:\TeamCity\Projects\Orchard-Default\src\Orchard.Web\Core\Settings\Descriptor\ShellDescriptorManager.cs:line 52
   at Orchard.Core.Settings.Descriptor.ShellDescriptorManager.GetShellDescriptor() in d:\TeamCity\Projects\Orchard-Default\src\Orchard.Web\Core\Settings\Descriptor\ShellDescriptorManager.cs:line 26
   at Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings settings) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\ShellBuilders\ShellContextFactory.cs:line 66
   at Orchard.Environment.DefaultOrchardHost.<CreateAndActivate>b__4(ShellSettings settings) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\DefaultOrchardHost.cs:line 112
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Orchard.Environment.DefaultOrchardHost.BuildCurrent() in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\DefaultOrchardHost.cs:line 97
   at Orchard.Environment.DefaultOrchardHost.Orchard.Environment.IOrchardHost.Initialize() in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\DefaultOrchardHost.cs:line 64
   at Orchard.Commands.CommandHostAgent.StartHost(TextReader input, TextWriter output) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Commands\CommandHostAgent.cs:line 116


Failed to initialize Orchard session.

Jul 7, 2011 at 9:50 PM

You need to give read/write access to the App_Data folder under wwwroot. unlike the web site which typically runs under a custom app pool account, orchard.exe runs under your user account identity.



Jul 8, 2011 at 9:25 PM


That worked. No error, message on success.

However, when I change the site to use the new theme, I still get the message "theme not found" (it's like a div that appears on the page).

Jul 12, 2011 at 12:49 AM

Is there any idea why theme is not found? Sorry to nag it's just important.

Jul 12, 2011 at 5:43 AM

Can you please give more details about what you did, what's in the theme, and any errors that get dumped into App_data/logs when this happens?

Jul 13, 2011 at 8:47 PM


- I followed the instructions here:


- All I did there after is change the css slightly (body). I copied just the files required as listed in that link, nothing more.


- I looked in that path but the logs are empty?




Jul 13, 2011 at 8:52 PM

Do you have a theme.txt file in your theme? It's almost impossible to figure out what's going on without seeing your theme. Would you mind zipping it and sending it to me at bleroy at microsoft?

Jul 13, 2011 at 9:40 PM

Sure. I will do that very soon, I will email you from the address info @ t h e p l a y g r o u n d s . c o . u k

Jul 16, 2011 at 1:01 AM
Edited Jul 16, 2011 at 1:02 AM

That you have no theme.txt explains that it isn't found. Add one.

Edit: wait, now I'm confused: you do have a theme.txt in there but you said you didn't in your e-mail...

Jul 17, 2011 at 11:31 PM

I was probably wrong, I don't think I carefully checked for that. Take what you see in the attachment as the proper answer.


So I have one in there, then what is the problem?

Jul 18, 2011 at 8:22 PM

I haven't had time to look at it yet, sorry.