Step guide to Setup Single Sign-On in CS
Posted by Anders Vindberg
in Lunarmedia Blog
on the 30 Sep. 2008 (42,526 views).
Scenario: Two websites (a main and a subdomain) are running on the same IIS but different app pools. CommunityServer is on a subdomain, eg. forum.lunarmedia.com, and is used as the primary membership provider. On the main site eg. lunarmedia.com, we want to show the logged in username etc. In order to do this we need to be sure the following are present in both web.config files.
1. In web.config add (Goto here to generate a machine key):
<system.web>
<machineKey validationKey="Your_Generated_Validation_Key_Goes_Here"
decryptionKey="Your_Generated_Decryption_Key_Goes_Here"
validation="SHA1" />
<!-- Other system.web elements -->
</system.web>
2. In web.config add a domain attribute to your <authentication mode="Forms"> node:
<authentication mode="Forms">
<forms name=".CommunityServer" domain=".lunarmedia.com" protection="All" timeout="60000" loginUrl="login.aspx" slidingExpiration="true"/>
</authentication>
3. Copy the Telligent.CommunityServer.SecurityModules.dll file to both "bin" folders of the two websites. You can get the dll from the Single Sign-on download at: get.communityserver.com
At lunarmedia.com we simply link to forum.lunarmedia.com/login.aspx, logout.aspx, etc. to take advantage of Community Server's membership flow.
P.S. the domain (lunarmedia.com) is only used as an example.