0

Basically, I want to be able to deploy a Orchard CMS web application to a windows azure cloud service. I v'e tried following the same steps as I would normally do for any other web application but it just never works.

UPDATE I downloaded the Orchard.Source.1.5.1 from orchardproject.net website. Added my custom modules and themes. Published the web application to a local folder. That would result in a Orchard web application. I open this web application, add the Windows Azure Cloud Service project and my web application is the web role in this project. I set up DataConnectionString to my azure cloud storage with my name and key. Published to Azure.

Once the deployment is over when I go to the site url to see the result I get this the YSOD with the following exception:


Server Error in '/' Application.

None of the constructors found with 'Public binding flags' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters: Cannot resolve parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher' of constructor 'Void .ctor(System.Func1[Autofac.Features.OwnedInstances.Owned1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable1[Orchard.Mvc.Routes.IRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator)'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Autofac.Core.DependencyResolutionException: None of the constructors found with 'Public binding flags' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters: Cannot resolve parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher' of constructor 'Void .ctor(System.Func1[Autofac.Features.OwnedInstances.Owned1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable1[Orchard.Mvc.Routes.IRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator)'.


UPDATE: I followed the guide in the orchard project website "Deploying Orchard to Windows Azure" and didn't touch anything, just got all the source code from the repository, ran ClickToBuildAzure from the Visual Studio 2010 command line, didn't get any error messages, set up my storage in the ServiceConfiguration file and uploaded my package and ServiceConfiguration files. Deployment went ok. I got to the Orchard Get Started screen but after input all the information, including a connection string to my SQL Azure DB (got the connection string from Azure Portal and inserted my password), I got the following error:

Setup failed: An exception was thrown while invoking the constructor 'Void .ctor(Orchard.Environment.Configuration.ShellSettings, Orchard.Data.ISessionLocator, System.Collections.Generic.IEnumerable`1[Orchard.Data.Migration.Interpreters.ICommandInterpreter], Orchard.Data.ISessionFactoryHolder, Orchard.Reports.Services.IReportsCoordinator)' on type 'DefaultDataMigrationInterpreter'.

I didn't even get to the AddingaModuletotheDistribution point.


The guide provided by the Orchard Team is not the ideal solution for me.

I have developed custom modules and themes and I work in a development environment with Visual Studio and TFS and would not like to use it with WebMatrix and and deploy to Azure Web site.

I downloaded the source code from the orchard website and added an azure web role project.

By the way, I've checked this question and this blog post and still could not resolve my problem.

Everything I find regarding this is fairly outdated!

I am almost giving up. Could anybody tell me if this is possible? Or the only way to work with Orchard is WebMatrix?

Community
  • 1
  • 1
Almeida
  • 46
  • 1
  • 5
  • Yes, of course it is possible, and I do it often. You will have to update the question with some more details for anyone to be able to help though. "it doesn't work" doesn't work. You need something more like "when I do X, I would expect Y to happen but Z happens". – Bertrand Le Roy Aug 20 '12 at 19:44
  • Hi Bertrand Le Roy, thanks. I updated the questions with steps to what I've done. – Almeida Aug 21 '12 at 15:59

2 Answers2

0

You need to read the documentation more carefully, as adding modules and themes is covered here: http://docs.orchardproject.net/Documentation/Deploying-Orchard-to-Windows-Azure#AddingaModuletotheDistribution

You need to add your modules and themes to the Azure solution, not the Orchard solution the is in src. Once you've done that, the ClickToBuildAzure script will generate a package that contains your modules and themes, and that will deploy well to Azure.

Bertrand Le Roy
  • 17,731
  • 2
  • 27
  • 33
  • I've done everything exactly like the instructions say up to this point - AddingaModuletotheDistribution - but still with no success. – Almeida Aug 22 '12 at 08:18
  • I cloned from https://hg01.codeplex.com/orchard. Exactly like the instructions on http://docs.orchardproject.net/Documentation/Setting-up-a-source-enlistment – Almeida Aug 28 '12 at 12:21
  • But the fact that the only way I can only deploy to a cloud service is by following the instructions on http://docs.orchardproject.net/Documentation/Deploying-Orchard-to-Windows-Azure means that it is not possible to have the Orchard source code on my company's TFS and add custom modules to it and deploy to a azure cloud service by adding an Azure project and deploying it from within Visual Studio, right? – Almeida Aug 28 '12 at 12:24
  • I don't see how that follows. What does TFS have to do with it? Why do you want to deploy from VS? – Bertrand Le Roy Aug 29 '12 at 00:11
  • I like to build/deploy from VS because it has much nicer interfaces for configuring and selecting deployment options as opposed to dealing with a text file. – Matthew Tschiegg Oct 19 '12 at 04:05
  • I agree with you Matthew. Oh and btw, we won't be using Orchard anymore in our company. It's just not a good option for companies. Maybe for individuals is fine. Too many restrictions. Not flexible for a collaborative development environment. Sad but true. – Almeida Oct 25 '12 at 16:23
  • What restrictions exactly? How is it not flexible? – Bertrand Le Roy Oct 25 '12 at 18:19
0

You could try http://docs.orchardproject.net/Documentation/Building-and-deploying-Orchard-from-a-source-code-drop This solved the exact same exception for me just now, but I built with the intent to run on IIS rather than Azure.

Didn't investigate to figure out what the steps in the link did to satisfy the IoC container that was not satisfied by doing a regular file system publish.