I'm looking into a multitenant application implemented in ASP.NET MVC. As per my requirement, I need to maintain a single session for all of the subdomains/domains pointing to my server IP. This setup is working fine in case of subdomains. But in case of cross domains(third party domains) set up is breaking. The way that I'm implementing them in case of subdomains using : i.e. I'm setting wildcard domain into web.config to share session between all subdomains of my domain pointing to same server.
The scenario is I'm having three domains like :
- abc.com
- x.abc.com
- def.com
abc.com is my website's parent domain. During a user visit I'm storing some info into session and then if someone is navigating to x.abc.com then I want the same info available on this current domain also. I've made that feasible by modifying web.config (i.e. adding httpcookies tag for my wildcard domain). But the same thing is not available on def.com. I'm looking for a setup that will make these sessions available on cross domains also i.e. on def.com also.**
But I've no idea to share sessions on cross domains. As I've found on some of the blogs that ASP.NET do allow to share sessions across domains. So is there any way to do so.