Orchard CMS 模块 web.config
我有一个现有的 MVC 3 Web 应用程序,我将其作为 Orchard CMS 内的模块运行。我的 Web 应用程序的主 web.config 包含一整套 appSettings、connectionStrings、system.serviceModel 和各种其他部分。
在我看来,这些设置中的大多数(如果不是全部)都被忽略了。
显然,一种解决方案是使用我的设置更新 Orchard.Web web.config,但我不希望尽可能自定义此 web.config,以便将来轻松升级。
在我的 Orchard 模块 MVC 应用程序中使用我自己的 web.config 是否有其他推荐的方法/最佳实践?
干杯。
I have an existing MVC 3 web application and i'm running it as a module inside Orchard CMS. My main web.config for the web app has a whole load of appSettings, connectionStrings, system.serviceModel and various other sections.
It looks to me as though the majority (if not all) of these settings are being ignored.
One solution would obviously be to update the Orchard.Web web.config with my settings, but i would prefer not to customise this web.config as far as possible to allow easy upgrade in future.
Are there any other recommended methods / best practices for using my own web.config within my Orchard module MVC app?
Cheers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在这里找到了答案: http://blog.wouldbetheologian.com /2012/09/loading-module-specific-connection.html
I found an answer here: http://blog.wouldbetheologian.com/2012/09/loading-module-specific-connection.html
是的,web.config 的问题在于它不支持租户。在 Orchard 中处理设置的推荐方法是将部件添加到站点内容类型。整个代码中有很多这样的例子。
这应该为您提供更多信息: http://docs.orchardproject.net/Documentation/Adding -自定义设置
Yes, the problem with web.config is that it is not tenant-aware. The recommended way of treating settings in Orchard is to add parts to the Site content type. There are quite a few examples of that throughout the code.
This should give you some more info: http://docs.orchardproject.net/Documentation/Adding-custom-settings