Dave Burke : Freelance .NET Web Developer specializing in Online Communities

CS Nuglet: Separate cookies when separate sites share a domain

We were experiencing errors when initially testing the Community Server Daily News List Blog at http://csnews.csmvps.com.  The Community Server MVP site at http://csmvps.com is a competely separate site, but because the two sites share a root domain, registered users of CSMVPS.COM were experiencing the runtime

CommunityServer.Components.Roles.GetUserRoleNames(String username, Boolean cacheable)

The Friday after Thanksgiving Holiday around lunchtime I was privileged to be online with Keyvan Nayyeri (in Iran), J-O Eriksson (in Sweden), and  The Wizard (Cheesehead Land) and we were talking about the error the new DN List Blog was throwing.  With Community Server studs like these guys, you know the problem didn't last long.  I should add that I had to leave the conversation for a family event and left these guys holding the bag-o-cookies with the Wizard at the administrative wheel.

As we already established, when the two separate community sites were trying to share the same domain cookie the GetUserRoleNames() error would occur.  If cookies were purged, the site was accessed without problem, but the error would then be thrown on the second site.

You can update your Community Server site's Cookie settings in the CP->Admin->Membership->Cookie and Anonymous Settings panel.  Here are the updated settings at csnews.csmvps.com entered by The Wizard.  csmvps.com was not touched.

 


One more change was required, updating the anonymousIdentification "domain" property in the csnews.csmvps.com web.config.

From this (default)

<anonymousIdentification enabled="false" cookieName=".ASPXANONYMOUS" cookieTimeout="100000" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="None" domain="" />


To this (notice the item in bold)

<anonymousIdentification enabled="false" cookieName=".ASPXANONYMOUS" cookieTimeout="100000" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="None" domain="csnews.csmvps.com" />

Comments (2) | Post RSS RSS comment feed

Posted on 11/29/2006 9:24:04 AM by Dave Burke
Categories: Community Server
Tags:

Related posts

Comments (2) -

11/29/2006 12:16:14 PM Permalink

And one could add that this was one of the fastest e-mail threads I've seen. We invented something new as well - chat by e-mail!! Wink

J-O Eriksson |

11/29/2006 12:40:57 PM Permalink

I know.  I looked at all the time stamps on the emails as the first thing when I got back to my PC.  Wild!

daveburke |


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke