This project is read-only.

Azure Deployment fails - Server Error in '/' Application

Topics: Installing Orchard
Aug 27, 2012 at 9:38 PM


We're haven some problems to deploy our Orchard site to Windows Azure. We build up a new Site with Orchard 1.5.1 and would like to publish it to Windows Azure. Da Database already exists as an SQL Azure Database.

We downloaded the Orchard 1.5.1 Source-Code, added the additional modules and our theme to the solution and started the deployment. If we access the site on Windows Azure, we simply get the "Server Error in '/' Application (originating exception: System.Web.HttpException (Path '/' was not found) ). If we are running the Site in the Azure Emulator, it works.

We are using Visual Studio 2012 and the newest Azure SDK. 

Since the website is already build, we cannot start from scratch (restart with an empty database). Any help is welcome! Thank you!



Aug 27, 2012 at 11:20 PM

If you have an already setup database, I would suggest that you first setup a new one, pointing to a new database, which will create the necessary configuration files in the blob storage, then use a blog storage explorer, and change the settings file to point to your running database.

Aug 28, 2012 at 7:26 AM

Hi sebastienros

Thank you for your feedback. We setup the  blob storage as you discribed by running Orchard in Azure Emulator (with connetion to our productive Blob storage and SQL Azure database). We than copied the content of the existing settings to the blob. If we are using Orchard in the Azure Emulator with the producitve blob storage and SQL Azure database, it works. Only if the application gets deployed on the web role, we receive the mentioned error. Any ideas how to get more Information about this error?



Aug 28, 2012 at 12:15 PM

Hi there

Having a look at the IntelliTrace log, there are several DependencyResolutionExceptions before the HttpException is thrown.

Thrown: "None of the constructors found with 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Orchard.Settings.CurrentSiteWorkContext' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.Settings.ISiteService siteService' of constructor 'Void .ctor(Orchard.Settings.ISiteService)'." (Autofac.Core.DependencyResolutionException) Exception Message = "None of the constructors found with 'Orchard.Environment.AutofacUtil.DynamicProxy2.ConstructorFinderWrapper' on type 'Orchard.Settings.CurrentSiteWorkContext' can be invoked with the available services and parameters:\r\nCannot resolve parameter 'Orchard.Settings.ISiteService siteService' of constructor 'Void .ctor(Orchard.Settings.ISiteService)'.", Exception Type = "Autofac.Core.DependencyResolutionException", Exception WinRT Data = "" 

Any ideas for the root cause? Did we miss something to be published to Windows Azure?



Aug 29, 2012 at 9:27 PM
Edited Aug 29, 2012 at 9:28 PM


We now solved the issue. I'll just post a short description about the solution for anybody else having the same errors. The problem is that we did not packaged the azure package correctly. We directly build the solution from within VS and deployed it from VS.

We noticed in ClickToBuildAzurePackage.cmd respectively AzurePackage.proj that there are extra actions taken which will not be executed with the Standard VS solution. The content of our template was not published correctly.

      <!-- filter to exclude any binary from a folder -->
      <Excluded Include="$(SrcFolder)\**\bin\**\*;$(SrcFolder)\**\obj\**\*;$(SrcFolder)\**\*.user;" />
      <!-- list of files from Themes, Core and Modules to export -->
      <Stage-Themes Include="$(SrcFolder)\Orchard.Web\Themes\**\*" Exclude="@(Excluded)" />
      <Stage-Core Include="$(SrcFolder)\Orchard.Web\Core\**\*" Exclude="@(Excluded)" />
      <Stage-Modules Include="$(SrcFolder)\Orchard.Web\Modules\**\*" Exclude="@(Excluded)" />

    <Copy SourceFiles="@(Stage-Themes)" DestinationFolder="$(MsDeployFolder)\Themes\%(RecursiveDir)" />
    <Copy SourceFiles="@(Stage-Core)" DestinationFolder="$(MsDeployFolder)\Core\%(RecursiveDir)" />
    <Copy SourceFiles="@(Stage-Modules)" DestinationFolder="$(MsDeployFolder)\Modules\%(RecursiveDir)" />


Aug 30, 2012 at 6:42 PM

Which explains the symptoms ... 

By the way you should take a look at the doc:

And this blog post:

Oct 4, 2012 at 12:44 AM
Edited Oct 5, 2012 at 12:45 AM

Just ran into this problem myself (v1.5.1). As discussed the error is packaging Orchard for Azure needs to include the Core; Themes and Modules folders.

This might help others wishing to build the Azure package from VS. Just add these folders to the Orchard.Azure.Web.proj as content items. An easy solution is to insert a new item group into the project; past the following into the project:

    <!-- list of files from Themes, Core and Modules to export -->
    <Content Include="Themes\**\*"  Exclude="**\bin\**\*;**\obj\**\*;**\*.user" />
    <Content Include="Core\**\*"    Exclude="**\bin\**\*;**\obj\**\*;**\*.user" />
    <Content Include="Modules\**\*" Exclude="**\bin\**\*;**\obj\**\*;**\*.user" />


Edit: changed exclude to match the set from AzurePackage.proj to fix a problem with contentpicker and make it consistent.

Oct 4, 2012 at 5:10 PM
Edited Oct 4, 2012 at 5:13 PM

Where is Orchard.Azure.Web.proj? I don't see it in my enlistment.

Oct 5, 2012 at 12:48 AM
TheMonarch wrote:

Where is Orchard.Azure.Web.proj? I don't see it in my enlistment.