将 Orchard 与现有 Azure 项目集成
我已阅读文档,但对于如何将 Orchard 与我现有的解决方案集成仍然有点迷失。
目前,我有一个解决方案,其中包含一个带有 WCF 服务 WebRole 和辅助角色的 Azure 项目。我想要实现的是添加另一个包含 Orchard 支持的网站 + 自定义模块(尚未编写)的 WebRole,并通过 Visual Studio 发布功能一次性将整个内容部署到 Azure(普通发布 - 不是 Web 部署) 。 WCF 服务将侦听 https://api.example.com,同时可以在 http://www.example.com(注意此处没有 SSL)。
这是否可能,如果可以,有人可以提供一些粗略的指导吗?
I've read the docs but I'm still a bit lost on how to integrate Orchard with my existing solution.
Currently I have a Solution containing an Azure Project with a WCF Service WebRole and a Worker Role. What I want to achieve is to add another WebRole containing an Orchard powered Website + custom modules (that yet have to be written) and deploy the whole thing to Azure in one go from the Visual Studio Publish feature (ordinary publish - not web deploy). The WCF Service would listen to https://api.example.com while the website would be reachable under http://www.example.com (note no SSL here).
Is this possible and if yes, could someone provide some rough guidance?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里的技巧是典型的 Orchard 下载作为网站项目 (WSP) 而不是 Web 应用程序项目 (WAP) 加载到 VS 中。 Azure Web 角色是 WAP,而不是 WSP,因此您有多种选择:
如果您要从全新的 Orchard 站点开始,请下载 Orchard 源代码(而不是 zip)并使用其中的 Azure 解决方案那里。您可以将两个现有角色集成到他们的 Azure 项目中,或者将所有 Orchard 内容移至您的 sln。我认为使用他们的 sln 并将您的两个项目添加到其中会更容易。
或者,如果您从现有的 Orchard 站点开始,则必须使用类似于 http://blogs.msdn.com/b/webdevtools/archive/2009/10/29/converting-a-web-site-project-to-a-web-application-project.aspx< /a>.这将需要更多的工作,因为示例正在移动 WebForms 站点,因此您需要选择 MVC3 项目模板,并在自己中添加所有 NuGet 包等。
无论哪种方式,它都不是微不足道的,但是如果您足够幸运属于上述第一类,那么应该不会花太长时间。
The trick here is that the typical Orchard download is loaded into VS as a Web Site Project (WSP) instead of a Web Appliation Project (WAP). Azure web roles are WAPs, not WSPs, so you have a couple of choices:
If you're starting with a brand new Orchard site, download the Orchard source code (instead of the zip) and use the Azure solution from in there. You can either integrate your two existing roles into their Azure project, or move all the Orchard stuff over to your sln. I would think it'd be easier just to use their sln, and add your two projects to it.
or, If you're starting from an existing Orchard site, you'll have to convert it to a WAP using techniques similar to what is outlined at http://blogs.msdn.com/b/webdevtools/archive/2009/10/29/converting-a-web-site-project-to-a-web-application-project.aspx. This will be a bit more work, as the sample is moving a WebForms site over, so you'll need to pick the MVC3 project template instead, and add all the NuGet packages in yourself, etc.
Either way, it's not trivial, but if you're lucky enough to fall into the first category above, it shouldn't take too long to do.