Integration of multiple ASP.NET applications
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 开发者_StackOverflow社区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
Master Pages are generally used to:
- reduce duplication of code
- reduce duplication of script and css includes
- provide a common layout to all pages that reference it
- provide a central location to perform logic
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.
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.
精彩评论