如何在Windows Azure中部署果园CMS?

问题描述:

专家介绍,

有没有你们的谁已经成功地构建和部署果园CMS(1.1及以上)在Azure中?

Is there any of you guys who has successfully built and deployed Orchard CMS (1.1 and above) in Azure?

我试图构建源$ C ​​$ CS(由codePLEX回购拉)如下建议:的 http://www.orchardpro​​ject.net/docs/Deploying-Orchard-to-Windows-Azure.ashx 但不断失败。如果你看到这篇文章的评论,你会看到一些人正与ClickToBuildAzurePackage.cmd同样的问题。它没有所有的时间!它不是在所有的工作!

I've tried to build the source codes (pulled from Codeplex repo) as suggested here: http://www.orchardproject.net/docs/Deploying-Orchard-to-Windows-Azure.ashx but keep on failing. If you see the comments of that article, you'll see some people are having the same problem with the ClickToBuildAzurePackage.cmd. It fails all the time!! It's not working at all!

接下来,我下载的源$ C ​​$ CS包(Orchard.Web.1.2.41.zip),并试图打开Orchard.Azure解决方案,构建和发布(配置了远程桌面连接)。我也把正确的DataConnectionString在ServiceConfiguration.cscfg文件发布之前。它给了我死亡的黄色画面,此消息:

Next, I downloaded the source codes package (Orchard.Web.1.2.41.zip) and tried to open the Orchard.Azure solution, build, and publish it (with remote desktop connection configured). I've also put in the correct DataConnectionString in the ServiceConfiguration.cscfg file before publishing it. It gave me a yellow screen of death with this message:

与政策Autofac.Core.Activators.Reflection.BindingFlagsConstructorFinder发现构造的无

None of the constructors found with policy 'Autofac.Core.Activators.Reflection.BindingFlagsConstructorFinder'

接下来,我想只部署在Azure包(没有源$ C ​​$ CS,Orchard.Azure.1.2.41.zip)。这一次,我能得到安装屏幕,但在安装已完成此之后,它给了我死亡的另一个黄色画面,多个错误消息,基本上提醒我要给予适当的权限媒体,主题,模块,以及一些其他文件夹... 。如何做我做,如果我什至不能设置为Azure中的远程桌面连接,在上面提到的?

Next, I tried to deploy the Azure package only (without source codes, Orchard.Azure.1.2.41.zip). This time, I could get the installation screen but then after setup was done, it gave me another yellow screen of death with several error messages that basically remind me to give proper permission for Media, Themes, Modules, and some other folders....How do I do that if I can't even setup the remote desktop connection for Azure as mentioned in the above?

我对这个放弃......我开始想果园CMS(1.1及以上)没有准备好Azure上。我能得到版本1.0.2和在Azure中运行(直接部署在Azure就绪包,我没建源$ C ​​$ CS)。

I'm giving up on this...I start to think Orchard CMS (1.1 and above) is not ready for Azure. I could get the 1.0.2 version up and running in Azure (directly deployed the Azure-ready package, I didn't build the source codes).

任何人都可以分享他们在这个问题上和一步一步的指引,让果园CMS(1.1及以上)在Azure中运行顺畅的体验?我想知道,如果我们也可以设置2实例为天青果园CMS?什么是我需要考虑的事情/如何实现的?

Can anybody share their experience on this matter and the step-by-step guideline to get Orchard CMS (1.1 and above) running smoothly in Azure? May I know if we can also setup 2 instances in Azure for Orchard CMS? What are the things I need to consider / do to achieve that?

谢谢!

我没有得到ClickToBuildToAcure.cmd脚本工作,这就是为什么我写的我自己一个人,斯图尔特帮助链接。我的博客 http://litemedia.info 是在Azure上运行,这些博客文章描述了我是如何做的。

I didn't get ClickToBuildToAcure.cmd script to work and that is why I wrote my own one, that Stuart helped linking to. My blog http://litemedia.info is running on Azure and those blog posts describes how I did it.

一些指点


  1. 我的Global.asax.cs看起来比起本地运行在Azure上有点不同。

  1. My Global.asax.cs looks a bit different on Azure compared to running local.

public class AzureApplication : HttpApplication
{
    public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
    }

    protected void Application_Start()
    {
        CloudStorageAccount.SetConfigurationSettingPublisher(
            (configName, configSetter) =>
                configSetter(RoleEnvironment.GetConfigurationSettingValue(configName))
            );

        // For information on handling configuration changes
        // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
        RoleEnvironment.Changing += (sender, e) =>
        {
            // If a configuration setting is changing
            if (e.Changes.Any(change => change is RoleEnvironmentConfigurationSettingChange))
            {
                // Set e.Cancel to true to restart this role instance
                e.Cancel = true;
            }
        };

        RegisterRoutes(RouteTable.Routes);
        Starter.LaunchStartupThread(MvcSingletons);
    }

    protected void Application_BeginRequest()
    {
        Context.Items["originalHttpContext"] = Context;
        Starter.OnBeginRequest(Context, MvcSingletons);
    }

    protected void Application_EndRequest()
    {
        Starter.OnEndRequest();
    }

    static void MvcSingletons(ContainerBuilder builder)
    {
        builder.Register(ctx => RouteTable.Routes).SingleInstance();
        builder.Register(ctx => ModelBinders.Binders).SingleInstance();
        builder.Register(ctx => ViewEngines.Engines).SingleInstance();
    }
}


  • 我曾与/ App_Data文件/目录网站部署的问题。确保当您上传包的Azure是空的。

  • I had problems deploying with sites in /App_Data/ directory. Make sure that it is empty when you upload your package to Azure.

    您需要告诉Autofac使用一些特定的Azure类的设置和博客存储。你会在/Config/Host.config和/Config/Sites.config找到这些。转到上面我的博客文章,看我怎么设置它们。

    You need to tell Autofac to use some Azure specific classes for settings and blog storage. You'll find these in /Config/Host.config and /Config/Sites.config. Go to my blog post above to see how I set them up.

    我花了几个小时追捕,这不是复制到Azure的封装组合。确保所有引用复制本地,即使是那些MVC3

    I spent several hours hunting down assemblies that was not copied to the Azure package. Make sure that all references are "Copy Local", even the MVC3 ones.

    真正确保您有ServiceConfiguration.cscfg正确DataConnectionString设置。我敲我的头撞在墙上很长一段时间,因为我已经把另一个帐户有一个连接字符串。

    Really make sure that you have the correct DataConnectionString setup in ServiceConfiguration.cscfg. I was banging my head against the wall for a long time because I had put a connection string for another account there.

    如果你打算从你需要设置将用于部署证书的脚本部署。我用Visual Studio创建的证书,然后只能从我的脚本引用它。

    If you intend to deploy from a script you need to setup a certificate that will be used for the deployment. I used Visual Studio to create the certificate, and then only reference it from my script.

    祝你好运!