locked
Share Session among several Sub Domains & a Single Sign In using Forms Authentication RRS feed

  • Question

  • User-331012720 posted

    Hi,

    In my application, we have few domains & a main domain:

    www.mysite.com

    subdomain1.mysite.com, subdomain2.mysite.com, subdomain3.mysite.com, subdomain4.mysite.com etc

    Sub Domains work as a blog service. So, www.mysite.com is main site. Now question is:

    1. How can I share Session among all sub domains & main domain. I have checked that If I save any Session variable when my is mysubdomain1.mysite.com & then I go to mysubdomain2.mysite.com, then Session value is not present. Means these are not sharing sessions.

    2. Also I have a Login page. So, user must be able to sign in single time (on any subdomain or main site) & this login must be shared in all subdomains & my site. I am using forms authentication.

    Can someone please suggest me any way to do this.

    Tuesday, January 1, 2013 5:27 AM

Answers

  • User-663458986 posted

    How can I share Session among all sub domains & main domain. I have checked that If I save any Session variable when my is mysubdomain1.mysite.com & then I go to mysubdomain2.mysite.com, then Session value is not present. Means these are not sharing sessions.

    Using Sql Server as your Session store, would help you.

    Refer this: http://support.microsoft.com/kb/2527105

    Also I have a Login page. So, user must be able to sign in single time (on any subdomain or main site) & this login must be shared in all subdomains & my site. I am using forms authentication.

    never been done this, but i thnk you'll get the logged in user as well with SQl Server approach. i think it's more depending what kind of authentication you are using for your website(s).

    just a hint: incase you couldn't find your logged in user, you can store the information in your custom Cookie, and retrevie it during cross domains request, and login the user forcefully behind the scene.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 1, 2013 11:29 PM