I need to integrate two ASP.NET sites user-wise. I have a Web Pages ASP.NET 4 site that allows users to login. It has a custom user provider. Now I have written an ASP.NET MVC3 site that needs to work seamlessly with the Web Pages site and to only allow certain actions to be called by certain users that come from Web Pages site’s user provider. As a final resort, MVC site can access user datastore of the Web Pages site.
P.S. I can configure ASP.NET MVC site to be in a sub-folder of a Web Pages site in IIS if this is necessary.
To setup
FormsAuthenticationto be used across multiple sub-domains, configure the following:Specify the domain of the Authentication cookie without a particular sub-domain – allows the browser to access the Authentication ticket from any sub-domain:
Make sure the separate applications use the same machine keys so they can encrypt/decrypt the authentication ticket properly:
Everything else is standard ASP.Net Authentication details/configurations.