single signon between multible sites in same umbraco installation
Setup:
Two sites (mysite.com & secure.mysite.com) in the same Umbraco installation. Secure.mysite.com has role-based restricted access.
I want to have a login form on mysite.com that navigates to and logs me into secure.mysite.com.
My problem is that the authcookie that is created, apparently is not accepted, because I am send to the login at secure.mysite.com, when i'm redirected.
You say both sites are in the same umbraco installation. Are they running on the same server or do you have perhaps a load balanced environment. Than it can be related to the machine key.
single signon between multible sites in same umbraco installation
Setup: Two sites (mysite.com & secure.mysite.com) in the same Umbraco installation. Secure.mysite.com has role-based restricted access.
I want to have a login form on mysite.com that navigates to and logs me into secure.mysite.com.
My problem is that the authcookie that is created, apparently is not accepted, because I am send to the login at secure.mysite.com, when i'm redirected.
I have the following entry in my web.config
When i log in from mysite.com, it generates a cookie that belongs to the domain .mysite.com, but still sends me to the loginform for secure.mysite.com
It's the same login logic/method thats being called from both login forms.
Any ideas why this isn't working? Is this machinekey related?
I'll be glad to post more code if needed.
Hi Jan,
Can you remove the leading dot in the domain name and see if that helps ?
That's how set it up for a site and that works fine.
Dave
The domain on the created cookie is still set to .mysite.com
You say both sites are in the same umbraco installation. Are they running on the same server or do you have perhaps a load balanced environment. Than it can be related to the machine key.
Dave
Nope, they are running on same server
Can you add cookieless="UseCookies" to the forms tag in the authentication section ?
Dave
I actually got it working.
The answer is in this articel https://msdn.microsoft.com/en-us/library/eb0zx8fc.aspx
I generated a machinekey on the IIS and added the generated values to the machinekey element in the web.config
https://blogs.msdn.microsoft.com/amb/2012/07/31/easiest-way-to-generate-machinekey/
thanks everyone for your help
Hi Jan,
I did it for you :-)
Dave
Thanks. Have a thunderous thursday ;)
is working on a reply...