ASP.NET MVC:需要部署站点的多个副本
我有一个应用程序需要为客户进行白标签和部署。功能将是相同的,所有页面将几乎相同。唯一真正的区别是缺少徽标/样式以及使用类似 SSO 的系统而不是常规表单身份验证。身份验证部分没有问题,因为只需注入即可。但是,对我来说按站点执行不同的母版页/配置文件的最佳方法是什么?
“最佳”意味着最不可能引起问题和维护麻烦。好的属性:快速/易于实施,快速/易于维护。
I have an app that I need to white-label and deploy for a client. The functionality will be identical, all the pages will be nearly identical. The only real difference will the missing logo/styling and the use of a SSO-like system instead of regular forms auth. The authentication part is no problem, as that can just be injected. But what's the best way for me to do different master pages / config files by site?
'Best' means least likely to cause problems and maintenance headaches. Attributes that would be good: quick/easy to implement, quick/easy to maintain.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在 ASP.NET 中编写自己的视图引擎,根据登录的客户加载不同的主题。
这样您就可以加载不同的级联样式表、母版页、视图......等。
大约一年前,我就此写了一篇文章:
https://github.com/geersch/ThemedViewEngine
You could write your own view engine in ASP.NET which loads a different theme depending on the customer that logs in.
This way you can load different cascading style sheets, master pages, views....etc.
About a year ago I wrote a post on this:
https://github.com/geersch/ThemedViewEngine