多个 ASP.NET 应用程序的集成
我被要求设计一种解决方案来集成多个 ASP.NET 应用程序,其中一些应用程序很大,其中集成意味着:
- 共享布局和 css
- 通用页眉、页脚和菜单
- 仅共享一个登录区域
我放弃在一个解决方案下加入应用程序,因为它们很大,将来可能会有更多应用程序,因此我正在考虑定义一个母版页或自定义控件,将其包含在每个应用程序的每个页面中。
该母版页或自定义控件将定义公共部分并控制访问安全性。
您觉得这个解决方案怎么样?其他(更好)的可能性? MasterPage 和自定义控件哪个更好?
谢谢
I've been asked to design a solution to integrate several ASP.NET applications, some of them are big, where integrations means:
- Share layout and css
- Common header, footer and menu
- Share only one login area
I discard joining applications under one solution as they are big and in the future there may be more applications so I'm thinking of defining a MasterPage or Custom Control that will be included in EVERY page of every application.
This MasterPage or Custom Control will define the common parts and control the access security.
What do you think of this solution? Other (better) possibilities? What's better, MasterPage or Custom Control?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
母版页通常用于:
您也可以在母版页上放置自定义控件,但对于您想要做的母版页是完美/唯一好的解决方案。
要共享单个登录区域,您可以创建一个不使用母版页的页面 (Login.aspx)。用户登录后,将其重定向到适当的页面。
为了控制访问,推荐的方法是使用表单身份验证和成员资格提供程序接口。角色成员资格提供程序将允许您将特定页面和代码路径限制为特定用户组(角色)。
Master Pages are generally used to:
You can put a custom control on a master page as well, but for what you want to do a master page is the perfect/only good solution.
To share a single login area you can create a page (Login.aspx) that doesn't use a master page. Once the user logs in, redirect them to the appropriate page.
To control access the recommended approach is to use forms authentication and the membership provider interface. The role membership provider will allow you to restrict specific pages and code paths to specific groups (roles) of users.
母版页可能有助于需要存在于外壳中的元素,在外壳中,内容可能源自用户控件,而用户控件源自正在集成的目标系统中的代码合并。
我可能会尝试实现一个用户控件,该控件可以在未修改的状态下调用原始系统。有点像实时屏幕抓取。然后通过将它们串在一起构建最终站点的原型版本,最终对结果进行回归测试(当您实际合并代码时)。
另一个完全不同的角度是将原始站点放入 iframe 中。
Master pages might help with elements that need to exist in a shell under a which the conents might be derived from user controls which are derived from the merging of code in the target systems being integrated.
I might try to implement a user control that that could make calls to the original systems in their unmodified states. A bit like screen scraping in real time. Then construct a proto-version of your final site by stringing them together, eventually regression testing against the result (when you actually merge code).
Another totally different angle would be to throw the original sites into iframes.