ScrewTurn ASP.NET Proxy Membership Provider


Project Description
Plugin for the ScrewTurn Wiki System to use Standard ASP.NET Membership and Role providers.

It works, except that some of the assumptions that ScrewTurn makes about the userprovider end up making things VERY slow: the Admin homepage and Accounts page both make a call to GetAllUsers. In our case, we've got 40k users and everything freaks out.

My new UserStoreProvider is an almost-perfect proxy for the System.Web.Security.Membership Sql provider, Roles Sql provider, and Profile Sql provider.

I've been reading about the ActiveDirectory plugin (where is it?) that sounds like it does what I've done in previous projects, using GetUser to store a copy of the user in the factory-default location while checking passwords against the AD and using the SQL tables for all else. This works well enough to get things working, but as long as the system I'm plugging into is well-written, using the provider instead of going direct to the DB tables, then I prefer a more "full featured" provider.

The SystemWebMembershipProxyProvider (whew, a mouthful) completely implements (natively) all necessary logic to pull users, groups, and profile data from any ASP.NET compliant combination of Membership, Role, and Profile providers ....Even if you aren't using SQL storage for your Wiki data. (in our case, we'd previously written a provider that authenticates against our CRM package that we wanted to reuse)

Usage

No configuration necessary. Just install it. Multiple User providers seems to work too.
Of course, configure your providers as you would any other .NET site. Remember your connection string!
Make sure that your Profile provider is configured with at least these fields:
<configuration>
  <system.web>
    <profile>
      <properties>
          <add name="displayName" type="System.String" />
          <add name="culture" type="System.String" />
          <add name="PageChanges" type="System.String" />
          <add name="DiscussionMessages" type="System.String" />
          <add name="NamespacePageChanges" type="System.String" />
          <add name="NamespaceDiscussionMessages" type="System.String" />
          <add name="Timezone" type="System.String" />
      </properties>
    </profile>
  </system.web>
</configuration>


To use pass-through authentication/single sign-on:
If you want to use a parent site for authentication and login (running ScrewTurn.Wiki as a child Application), and the login form from the parent site, edit the web.config file like this.
<configuration>
  <system.web>
    <authentication mode="Forms">
      <forms loginUrl="/Login.aspx" path="/" enableCrossAppRedirects="true" />
    </authentication>
  </system.web>
</configuration>

Installation

Upgrading

I'm not sure how the auto-upgrade works. So for now:

Version Changes

What Dosn't Work

The GetUsers() and GetUsersForGroup(string) methods are evil and used way too often in the ScrewTurn platform. Since I have thousands of users, this method returns null. Meaning that these known features won't work: