Authenticate to all subdomains using ASP.NET forms authentication

Hello Experts,

I am looking for help in understanding how to authenticate users to all subdomains of a domain using forms authentication.  I have a toplevel which allows anonymous access to most of the site (I have a secured directory that requires login) and provides an login control.   All this is working fine.

However, I need to allow users to login using the login control at the top-level domain and be authenticated (and redirected) to a subdomain:  I have set up the subdomain to be secure and it is working as expected.  How can I allow users who sign in to the top-level be authenticated to the subdomain as well.  FYI - both domains are hosted on the same server.

Thanks for any help.  
Who is Participating?
soapygusAuthor Commented:
Great post! I am really grateful.

I used scenario 3 and created the FormsAuthenticationticket with a 'domain' level cookie inside of the Login_Click event.  

I also had to place identical machinekey value in the web.config files of the top and sub domain.

Worked as explained.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.