This article describes Integrating SharePoint Server 2007 with Community Server Membership Databases. If you’re looking for Community Server and MOSS, you can always consider ASPHostPortal as the alternatives. We give our best for you.

Getting Started

Community Server uses the membership and role providers in ASP.NET. ASP.NET includes the System.Web.Security.SqlMembershipProvider class and the System.Web.Security.SqlRoleProvider class. These classes communicate with an ASP.NET membership database that is usually created by using the command-line tool, aspnet_regsql.exe.

Modifying ASP.NET Web.config Files

Locate the web.config file of the SharePoint site that you want to use forms-based authentication. By default, the path of this file is the following: local_drive:\inetpub\wwwroot\wss\VirtualDirectories\80.

Next, locate the web.config file for SharePoint Central Administration.

To locate the webconfig file for SharePoint Central Administration

1. At a command prompt, type inetmgr to launch Internet Information Services (IIS).

2. In IIS, expand the node computer_name (local computer).

3. Expand Web Sites.

4. Right-click SharePoint Central Administration, and then click Properties.

5. Click Home Directory.

6. Under Local Path, note the location of the web.config file. For example,
local_drive:\inetpub\wwwroot\wss\VirtualDirectories\7552.

The number, 7552 in this example, indicates the port number on which this site runs.

After locating these two web.config files, add the following XML to both files immediately after the <SharePoint> section and before the <system.web> section. If there is already a <connectionString> section, insert the <add> element contents to the existing section. The following XML example points to a database located on the local computer. The database instance runs on Microsoft SQL Server 2005 Express Edition (MSDE).

  <connectionStrings>

    <add name="AspNetSqlProvider" connectionString="Data Source=.\SQLEXPRESS;database=CommunityServer;Trusted_Connection=True" />

  </connectionStrings>

The following example shows how to point to a database on a remote computer.

<add name="AspNetSqlProvider" connectionString="Data server=myRemoteServerName;database=

  CommunityServer;Trusted_Connection=True" />

Next, add the following XML to the <system.web> section of the web.config file of the SharePoint site.

<membership defaultProvider="AspNetSqlMembershipProvider">

      <providers>

        <remove name="AspNetSqlMembershipProvider" />

        <add connectionStringName="AspNetSqlProvider"

passwordAttemptWindow="10"

           enablePasswordRetrieval="false" enablePasswordReset="true"

           requiresQuestionAndAnswer="true" applicationName="Community_Server_application_instance"

           requiresUniqueEmail="false" passwordFormat="Hashed"

           description="Stores and retrieves membership data from the SQL Server database"

           name="AspNetSqlMembershipProvider" type=

             "System.Web.Security.SqlMembershipProvider,

           System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

      </providers>

    </membership>

 

    <roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">

      <providers>

        <remove name="AspNetSqlRoleProvider" />

        <add connectionStringName="AspNetSqlProvider" applicationName=" Community_Server_application_instance "

           description="Stores and retrieves role data from the local SQL Server database"

           name="AspNetSqlRoleProvider" type=

             "System.Web.Security.SqlRoleProvider,

           System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

      </providers>

    </roleManager>

Add the following XML to the <system.web> section of the web.config file of SharePoint Central Administration.

<membership defaultProvider="AspNetSqlMembershipProvider">

      <providers>

        <remove name="AspNetSqlMembershipProvider" />

        <add connectionStringName="AspNetSqlProvider" passwordAttemptWindow="10"

           enablePasswordRetrieval="false" enablePasswordReset="true"

           requiresQuestionAndAnswer="true" applicationName="Community_Server_application_instance"

           requiresUniqueEmail="false" passwordFormat="Hashed"

           description="Stores and retrieves membership data from the SQL Server database"

           name="AspNetSqlMembershipProvider" type=

             "System.Web.Security.SqlMembershipProvider,

           System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

      </providers>

    </membership>

 

    <roleManager enabled="true" defaultProvider=

      "AspNetWindowsTokenRoleProvider">

      <providers>

        <remove name="AspNetSqlRoleProvider" />

        <add connectionStringName="AspNetSqlProvider" applicationName="Community_Server_application_instance"

           description="Stores and retrieves roles data from the local Microsoft SQL Server database"

           name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider,

           System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=

             b03f5f7f11d50a3a" />

      </providers>

    </roleManager>

Community_Server_application_instance is the name of the Application instance for Community Server. By default, this is usually "dev".

To determine the Community_Server_application_instance name

1. In Community Server, start SQL Server Management Studio and examine the aspnet_Applications table.

2. From the ApplicationName column, select the appropriate application name.

The only difference between the two code examples is the defaultProvider for role manager. This ensures that we can continue to use Windows authentication for SharePoint Central Administration but make Community Server Users discoverable in the People Picker control for the SharePoint site.

After you save the files, you must reset IIS. To do so, in a Command Prompt window, type IISRESET /RESTART.

Enabling Forms-Based Authentication on Windows SharePoint Services

The next step is to enable forms-based authentication for the SharePoint site by using SharePoint Central Administration.

To enable forms-based authentication

1. Click Start, point to All Programs, point to Microsoft Office Server, and then click SharePoint 3.0 Central Administration.

2. Click Application Management.

3. In the Application Security section, click Authentication Providers.

4. Under Zone, click Default.

5. Choose Forms.

6. In the text boxes, type the MembershipProvider (typically AspNetSqlMembershipProvider) and RoleProviders (typically AspNetSqlRoleProvider), defined in the Membership and Role Manager sections respectively in the XML above, and then click Save.

When you save the changes, Windows SharePoint Services automatically adds an Authentication section to the web.config file for the SharePoint site indicating to IIS to use forms-based authentication instead of the default Windows authentication.

Adding a Community Server Administrator to the SharePoint Site

Next, we add a Community Server administrator to manage the SharePoint site. If there is not one already, create a user in the Community Server site to act as the administrator for the SharePoint site. The user does not have to have any special roles defined. We used the built-in Community Server Admin account.

To add a Community Server Administrator to the SharePoint site

1. Click Start, point to All Programs, point to Microsoft Office Server, and then click SharePoint 3.0 Central Administration.

2. Click Application Management.

3. In the Application Security section, click Policy for Web application.

4. In the list of Web applications, select the Web application on which you want to operate.

5. Click Add Users.

6. From the Zone list, select Default, and then click Next.

7. In the Users box, type the user name of the administrator account that you created in Community Server.

8. Press Enter or click the check box to resolve the user. If the user name does not resolve, check the web.config settings and connectionString values.

9. After the name resolves, select Full control, and then click Finish.

Adding Community Server Roles to SharePoint Security Groups

Adding individual users to SharePoint security groups manually is time-consuming and creates unnecessary and redundant overhead for site administrators because typically there is already a security group that defines a set of users. The latest release of SharePoint Products and Technologies treat ASP.NET roles as security groups. For example, we can add the Community Server "Registered Users" role to the "Home Visitors" group of the SharePoint site. This assigns any member of the Community Server "Registered Users" role to the "Home Visitors" group. Members of the "Registered Users" role would then have read and view access to the SharePoint site.

To grant access for Community Server users to the SharePoint site

1. In Internet Explorer, browse to the SharePoint site.

2. Log on to the SharePoint site by using the Community Server account to which you assigned full control: the "admin" account with the password assigned to it.

3. Type the user name and password for the administrator account.

4. Click Site Actions.

5. Click Site Settings and then click People and Groups.

6. In the list of security groups, select Home Visitors.

7. Click New.

8. In the Users text box, type Registered Users and then press Enter.

9. After the name resolves, click OK.

10. Test the access with a Community Server user account from the "Registered Users" role. Log on to the SharePoint site. You should see the read-only version of the SharePoint site.

Conclusion

Community Server is a great example of software that is built on top of the ASP.NET flexible membership services. The ASP.NET membership services enables their software to easily interoperate with other products that also use membership services, in this particular case SharePoint Server 2007. The ASP.NET RoleProvider model abstracts Role assignments away from the IT department and to someone closer to this task, so that the IT department can focus on larger issues.

Reasons why you must trust ASPHostPortal.com

Every provider will tell you how they treat their support, uptime, expertise, guarantees, etc., are. Take a close look. What they're really offering you is nothing close to what ASPHostPortal does. You will be treated with respect and provided the courtesy and service you would expect from a world-class web hosting business.

You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added- benefits you can find when hosting with us:

- DELL Hardware
Dell hardware is engineered to keep critical enterprise applications running around the clock with clustered solutions fully tested and certified by Dell and other leading operating system and application providers.
- Recovery Systems
Recovery becomes easy and seamless with our fully managed backup services. We monitor your server to ensure your data is properly backed up and recoverable so when the time comes, you can easily repair or recover your data.
- Control Panel
We provide one of the most comprehensive customer control panels available. Providing maximum control and ease of use, our Control Panel serves as the central management point for your ASPHostPortal account. You’ll use a flexible, powerful hosting control panel that will give you direct control over your web hosting account. Our control panel and systems configuration is fully automated and this means your settings are configured automatically and instantly.
- Excellent Expertise in Technology
The reason we can provide you with a great amount of power, flexibility, and simplicity at such a discounted price is due to incredible efficiencies within our business. We have not just been providing hosting for many clients for years, we have also been researching, developing, and innovating every aspect of our operations, systems, procedures, strategy, management, and teams. Our operations are based on a continual improvement program where we review thousands of systems, operational and management metrics in real-time, to fine-tune every aspect of our operation and activities. We continually train and retrain all people in our teams. We provide all people in our teams with the time, space, and inspiration to research, understand, and explore the Internet in search of greater knowledge. We do this while providing you with the best hosting services for the lowest possible price.
- Data Center
ASPHostPortal modular Tier-3 data center was specifically designed to be a world-class web hosting facility totally dedicated to uncompromised performance and security
- Monitoring Services
From the moment your server is connected to our network it is monitored for connectivity, disk, memory and CPU utilization - as well as hardware failures. Our engineers are alerted to potential issues before they become critical.
- Network
ASPHostPortal has architected its network like no other hosting company. Every facet of our network infrastructure scales to gigabit speeds with no single point of failure.
- Security
Network security and the security of your server are ASPHostPortal's top priorities. Our security team is constantly monitoring the entire network for unusual or suspicious behavior so that when it is detected we can address the issue before our network or your server is affected.
- Support Services
Engineers staff our data center 24 hours a day, 7 days a week, 365 days a year to manage the network infrastructure and oversee top-of-the-line servers that host our clients' critical sites and services.