This project is read-only.

Orchard on Azure local dev

Jan 25, 2011 at 9:06 PM

Could this run on Azure local dev fabric?  I've got the ff error when tried:

Server Error in '/' Application.

None of the constructors found with policy 'Autofac.Core.Activators.Reflection.BindingFlagsConstructorFinder' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters:
Constructor 'Void .ctor(System.Func`1[Autofac.Features.OwnedInstances.Owned`1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable`1[Orchard.Mvc.Routes.IRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable`1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher)' parameter resolution failed at parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher'.

Line 38: 
Line 39:             _host = OrchardStarter.CreateHost(MvcSingletons);
Line 40:             _host.Initialize();
Line 41:         }
Line 42: 


I'm using the ff system:  Windows 7 Ultimate, VS 2010 Ultimate, MVC 3 RTM, Windows Azure SDK 1.3, SQL Express 2008 R2. 

Orchard.Web works fine on me but I need the Azure version.  Please help.  Thanks.

Jan 27, 2011 at 8:51 PM

Hi Orchard Team,

Any help?  I wanted to run the projet first on local dev before publishing to Azure.  I used the latest source but still not able to make it run on local.


Feb 1, 2011 at 6:05 AM

I'm having the same problem. It also has a similar error when deploying to azure from visual studio.

Feb 2, 2011 at 1:42 AM

I just had a quick chat with Sebastien (our Azure expert in Orchard). As far as I understand, there are 3 ways to run an Azure application:

1. "F5" from Visual Studio

2. Deploy/run a package locally using the "csrun" command from the Azure SDK

3. Deploy/run a package on the Azure cloud

The state of Orchard (at this point in time) is that we only support option #3. Option 1 never worked with Orchard, Option 2 used to work up to the Azure SDK 1.2, but stopped working with the Azure SDK 1.3. We have been investigating, but we still can't figure out what's going on.

Just out of curiosity for Azure users here, which scenario is the most important to you guys? (between 1 and 2, i'm assuming not having 3 would be a show stopper :)).

Feb 2, 2011 at 5:31 AM

I would like to see option 1. I was able to get option 3 working, but I don't know what changed, maybe copying local more assemblies, or refreshing a few times to let orchard load fully. Maybe I was hitting it too soon before it had a chance to get fully loaded. Seems to be working fine now in the cloud, but I really would like to be able to run it in the debugger. I figure for the most part I can just test things in the debugger with the non azure project then when I'm ready to deploy build it in the azure project and deploy. Now I'm just having a hard time getting custom lists/items to show up, but I'm sure thats an easy one I can figure out by doing a little more reading in the docs.

Feb 2, 2011 at 6:52 AM

I'd really like some guidance on how to setup my dev environment for working with orchard azure. Connecting my local version of orchard to my azure database creates two home pages and possibly other stuff, so I'm not sure if this is a good idea or not. Using the orchard command line for azure is obviously not going to happen, but couldn't I use my local version then deploy my changes? I'm not sure how well this will work yet. Should I just dev with the Orchard.sln instead of Orchard Azure? Should I just forget about Azure for the moment and get my site the way I want it locally first then build the azure package and deploy? Any tips on how to work with orchard azure development would be helpful.

Feb 3, 2011 at 10:22 PM

I like option 1 or run on local dev first before anything else.  Why can't the Orchard team provide the steps?  Is this open?  How did they make sure that it works fine in Windows Azure without debugging first in local.  Did they used other IDE other than Visual Studio?

Feb 20, 2011 at 7:34 PM

I did some digging this w-e and found a way to enable #1 (run and debug in Visual Studio).

I made a few fixes in the dev branch to enable it "in the box", so it will work in 1.1:

It should be easy to make similar changes to a 1.0 source enlistment. The "trick" is simply to make sure that the src/Orchard.Web/[Modules|Core|Themes] directories are copied to the "src\Orchard.Azure\Orchard.Azure.Web" directory before running (or debugging) the project from VS (that's what the 1st changeset above does). The 2nd changeset fixes an issue when selecting SqlCe in the Setup screen (this is not recommended for Azure deployment of course, but works for testing purpose locally). The 3rd changeset ensure that the Media module stores media files in the Azure Local Storage (blob) instead of the file system.

I still can't figure out how to enable #2 (running using csrun), but it sounds like #1 is more important for now.



Mar 14, 2011 at 11:07 PM

Thanks for those patches, Renaud. Media works now on my Azure instance.