This project is read-only.

Fresh install of 1.7 to Azure Web Site goes straight to YSOD

Topics: Installing Orchard
Sep 3, 2013 at 10:40 PM
Edited Sep 3, 2013 at 10:40 PM
I'm a complete noob with Orchard, so I'm certain I'm missing something.
I've followed this guide:

Specifically about deploying to a website (not cloud service)

After publishing I get a YSOD with this exception
None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' 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.Func`1[Autofac.Features.OwnedInstances.Owned`1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable`1[Orchard.Mvc.Routes.IRouteProvider], System.Collections.Generic.IEnumerable`1[Orchard.WebApi.Routes.IHttpRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable`1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator)'.
I won't post the whole stack trace unless someone really wants to see it.

Any ideas guys?

Oct 9, 2013 at 11:25 PM
When you say straight, is it for instance after 1 min and 50 seconds ?
Oct 9, 2013 at 11:44 PM
Straight as in publish, check, boom
Oct 10, 2013 at 12:30 AM
Can you try with Orchard 1.7.1 and this topic:

Also, the topic you mentioned is not about Azure Websites, please confirm you are not taking one for the other.

Oct 10, 2013 at 12:36 AM
I will try 1.7.1 tomorrow and let you know.

Yes the topic I mentioned is about Azure websites. Scroll to the bottom of the page...
Oct 10, 2013 at 9:19 PM
stefanos79, just a long shot here, what instance size are you using for your web site? Also can you check the log for a message "no suitable loader found for extension". There is a known issue with multicore instances that gives exactly the exception you are seeing.
Oct 14, 2013 at 12:00 AM
I discovered there was a rather important step missing in the deployment instructions for Azure Web Sites - I suspect you may have been hit by this omission. Before you actually publish:

Right click the solution node in Solution Explorer and select Rebuild. This step is necessary to get all modules and themes compiled, thereby having their resulting DLL files included in the published package; compilation of modules and themes does not happen automatically since they are not referenced by the Orchard.Web project being published.

I've updated the docs with this additional steps, and will try to get this more automated for 1.7.2.
Marked as answer by Decorum on 10/13/2013 at 4:00 PM
Oct 14, 2013 at 8:42 AM
Edited Oct 14, 2013 at 8:43 AM
I don't understand why for Orchard Visual Studio 2012 is not working as for an ordinary Web Role which is compiled before including files in the published set of files ?
And upto 1.7, when you were using publish for a classic IAAS/VM Orchard install, VS was always recompiling ? I have still not publish 1.7.1 due to changes going on my side...
Are you speaking of Debug version, which I have never used ?
Oct 15, 2013 at 6:30 PM
Yeah all the publishing stuff was changed pretty drastically between 1.7 and 1.7.1 to enable all the VS tooling for Azure to be used, one-click publishing. Don't quite recall how it worked before, but I'm sure there are ways to ensure all modules and themes are compiled automatically when Orchard.Web is built. Like I said we need to look into this for 1.7.2.
Jan 28, 2014 at 2:22 PM
Edited Jan 28, 2014 at 2:23 PM
Was there a resolution to this? When I deploy (1.7.1) to an Azure web site using the docs listed above, I get this exception. The exception occurs immediately when the application is trying to initialize the shell. The application runs fine locally, but not on an Azure website using web deploy.

Comparing my local /bin to the Azure website /bin, the Orchard.Core.dll is missing from the Azure website. I don't understand why the Orchard.Core.dll is missing. It is included in the build configuration.
Jan 28, 2014 at 10:56 PM
Wilk: Did you try the steps in the answer, i.e. building the solution before publishing?
Jan 28, 2014 at 10:57 PM
And by the way, this was fixed for 1.7.2 using project dependencies.
Jan 29, 2014 at 10:17 PM
Yes, I did follow the steps. I am running code that was last pulled 10 days ago. I reset all of my code from trying several alternate solution, and that got me back to the log4net missing issue.

When following the above instructions for publishing to an Azure website, rather than a cloud service, the log4net.dll does not get deployed. The process is basically a WebDeploy of the Orchard.Web project. Orchard.Framework and Orchard.Framework.Tests reference log4net.dll, but as a dependent assembly, it does not get copied to the deployment /bin. Adding log4net.dll as a link to Orchard.Web and set CopyToOutput -> 'always copy' will cause the log4net.dll to be copied to the deployment /bin. Once this is done, the standard WebDeploy is successful.
Jan 29, 2014 at 10:22 PM
I gave up mate. Unfortunately, I had to fall back to Umbraco. Shame really as I wanted to give orchard a go, but it was too much hassle
Jan 29, 2014 at 11:45 PM
Wilk: I had to do something similar for Newtonsoft.Json.dll earlier. Sounds like what you did for Log4net.dll should be incorporated into the code base. Please file a bug for it and it'll be taken care of.