I've searched over these forums and online documentation for days now, trying to figure out why I can't get this working for me. Have just about reached the end of my patience rope and would love some assistance.
I have an existing ASP.NET web application that has its own registration/login, but does not use the ASP.NET membership provider (was written before it was available). I am trying to integrate Community Server 2007 (I believe it's 2007, SP2), using the SSO module for cookie authentication. I have our existing app set up on a test server (http://testserver/testapp), with the community server app in a virtual directory within it (http://testserver/testapp/cs). The two Telligent DLLs for SSO have been copied into my CS web/bin directory.
Here are the settings:
CS web.config
<authentication mode="None">
</authentication>
CS communityserver.config
<add name="CustomAuthentication"
extensionType="Security"
type="Telligent.CommunityServer.Security.CookieAuthentication, Telligent.CommunityServer.SecurityModules"
allowAutoUserRegistration="true"
authenticatedUserCookieName="CSUser"
usernameKey="username"
emailAddressKey="emailAddress"
useEncryptedCookie="false"
cookieValueStringFormat="Base64"
cookieValueEncryptionFormat="ValuesOnly"
/>
I also tried setting wwwStatus = "Ignore" (instead of Remove) in the Core section, but it doesn't appear to make a difference.
CS SiteUrls.config:
Updated the login and registration URLs to point to the testapp appropriate pages.
testapp login.cs code to set cookie:
// Handle Community Server authentication
HttpCookie cookie = Request.Cookies["CSUser"];
if (cookie == null)
{
cookie = new HttpCookie("CSUser");
}
cookie.Values["username"] = user.FullName;
cookie.Values["emailAddress"] = user.Email;
cookie.Expires = DateTime.Now + new TimeSpan(7, 0, 0, 0);
Response.Cookies.Add(cookie);
Ok, here is what is happening. When testing, if I try to access a restricted CS page (control panel, for instance), it correctly redirects me to the testapp login page. I then log in using my testapp login information. When I check cookies at this point, it looks like everything is created correctly (I see CSUser with values of username=Dawn&emailAddress=xxxxxx@yahoo.com). However, when I then go to a CS page, I still see the Sign In link at the top of the page. I also have gone to check the aspnet_Users table, but nothing new has been created).
What am I doing wrong?