azure - 使用 Azure 网站扩展 Orchard

标签 azure orchardcms azure-web-app-service

我目前正在尝试使用最近发布的“网站”功能在 Azure 上安装 Orchard。

我已经使用库中的模板成功安装和设置了 Orchard,到目前为止一切似乎都很顺利。

我的问题是:如果我扩展站点以使用 3 个实例,我需要做什么特殊的事情来确保所有实例都在同一个缓存中工作?因此,一个新页面会同时出现在所有实例上。

我对 Umbraco 有一点经验,我必须将文档和缓存推送到 Blob 存储中才能正常工作。

模板已经处理了这个问题吗?

感谢您的帮助,

最佳答案

a guide on the Orchard website解释了如何部署到 Windows Azure Web 角色(云服务)。我还没有见过支持多个保留实例的 Windows Azure 网站实现。

为了使 Orchard 在多个保留实例上工作,您需要将其配置为使用 AzureBlobStorageProvider,这将确保文件持久保存到 Blob 存储而不是本地文件系统。这是配置 Sites.config 的方式:

  <component instance-scope="per-lifetime-scope"
             type="Orchard.Azure.FileSystems.Media.AzureBlobStorageProvider, Orchard.Azure"
             service="Orchard.FileSystems.Media.IStorageProvider">
  </component>

在 Global.asax.cs 中,您还需要确保从 web.config 读取存储帐户信息:

        CloudStorageAccount.SetConfigurationSettingPublisher(    
            (configName, configSetter) =>    
                configSetter(ConfigurationManager.AppSettings[configName])    
            );

关于azure - 使用 Azure 网站扩展 Orchard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12582947/

相关文章:

Azure表: how to manage class versions

orchardcms - 合并开发和生产数据库中的 Orchard 内容

orchardcms - 覆盖主题中的编辑器模板会影响管理 View

continuous-integration - 为什么 Azure 门户的部署中心中没有外部 git 存储库的选项?

pdf - Azure 应用服务 : Converting docx to pdf

azure - 如何通过 Microsoft Graph API 以编程方式创建 Microsoft MsaAppId 和 MsaAppPassword?

c# - 为什么在函数应用程序的启动中注入(inject)的 DelegatingHandler 上的 SendAsync 永远不会被调用?

azure - 使用azure CLI获取云服务中的实例数量

c# - 我可以通过 Lucene 在 Orchard 中搜索/索引自定义数据源吗?

redis - Azure 在内存 (IMemoryCache) 或 Redis (IDistributedCache) 中使用哪种缓存模型