New Partner Provisioning

The Partner Portal application includes a configuration script that is named ContosoSetup.bat. This script provisions the Partner1 and Partner2 sites. This topic includes two procedures. The first procedure shows you how to add additional partner sites. The second procedure shows you how to add new members and a new role to the forms-based authentication database.

Ff649899.note(en-us,PandP.10).gifNote:
Wherever you see PartnerN in the procedures, substitute Partner3, Partner4, and so on.

To provision a new partner site

  1. Run the following script to create a PartnerN site collection, incidents site, and order exceptions site. The script also activates the features that are required by these sites.
    
    REM Create PartnerN site, incidents web and orderexceptions web
    REM Replace PartnerN with respective Partner ex:PartnerN
    REM update ownerlogin with respective login
    
    set ownerlogin=domain\username
    set stsadm=%CommonProgramFiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe
    
    if exist "%stsadm%" goto STSEnd
    stsadm=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe
    
    if exist "%stsadm%" goto STSEnd
    stsadm=C:\Program Files (x86)\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe
    :STSEnd
    
    "%stsadm%" -o Createsite -url http://localhost:9001/sites/PartnerN -owneremail myname@mydomain -ownerlogin %ownerlogin% -sitetemplate STS#0 -description "PartnerN"
    
    "%stsadm%" -o createweb -url http://localhost:9001/sites/PartnerN/incidents -sitetemplate sts#1 -title Incidents
    "%stsadm%" -o createweb -url http://localhost:9001/sites/PartnerN/orderexceptions -sitetemplate sts#1 -title "Order Exceptions"
    REM Activating feature PublishingSite
    "%stsadm%" -o activatefeature -id F6924D36-2FA8-4f0b-B16D-06B7250180FA -url http://localhost:9001/sites/PartnerN
    REM Activating feature PublishingWeb 
    "%stsadm%" -o activatefeature -id 94C94CA6-B32F-4da9-A9E3-1F3D343D7ECB -url http://localhost:9001/sites/PartnerN
    REM Activating feature ContosoPartnerPortalPromotionsSite
    "%stsadm%" -o activatefeature -id 6fd12cb8-f910-4cf4-b7d0-6b74769483ae -url http://localhost:9001/sites/PartnerN
    REM Activating feature PartnerCollaborationSite
    "%stsadm%" -o activatefeature -id f15ec5c3-d97f-4838-b874-0224dbbee676 -url http://localhost:9001/sites/PartnerN
    REM Activating feature PartnerCollaborationWeb
    "%stsadm%" -o activatefeature -id 0d4249b5-6c67-466a-8c5a-a49cb7aff73e -url http://localhost:9001/sites/PartnerN
    REM Activating feature IncidentSubSiteResources
    "%stsadm%" -o activatefeature -id 1c28f48f-6544-45b3-8db0-e87977c09e46 -url http://localhost:9001/sites/PartnerN
    REM Activating feature IncidentDashboard
    "%stsadm%" -o activatefeature -id 86dfa338-3643-49c3-a935-26b043547326 -url http://localhost:9001/sites/PartnerN/incidents
    REM Activating feature ContosoPSSOrderExceptionSite
    "%stsadm%" -o activatefeature -id c5decae2-d3e2-4048-a25a-42c5fe6eac29 -url http://localhost:9001/sites/PartnerN
    REM Activating feature ContosoTheme
    "%stsadm%" -o activatefeature -id 7a576729-6fb8-4597-bbad-59c2aa7d7d0e -url http://localhost:9001/sites/PartnerN
    "%stsadm%" -o activatefeature -id 7a576729-6fb8-4597-bbad-59c2aa7d7d0e -url http://localhost:9001/sites/PartnerN/incidents
    "%stsadm%" -o activatefeature -id 7a576729-6fb8-4597-bbad-59c2aa7d7d0e -url http://localhost:9001/sites/PartnerN/orderexceptions
    REM Activating feature ContosoContextualHelp
    "%stsadm%" -o activatefeature -id 92a99385-aefc-4718-98c2-1ac541c55a6e -url http://localhost:9001/sites/PartnerN
    "%stsadm%" -o activatefeature -id 92a99385-aefc-4718-98c2-1ac541c55a6e -url http://localhost:9001/sites/PartnerN/incidents
    "%stsadm%" -o activatefeature -id 92a99385-aefc-4718-98c2-1ac541c55a6e -url http://localhost:9001/sites/PartnerN/orderexceptions
    REM Activating feature ContosoPSSGlobalNav
    "%stsadm%" -o activatefeature -id be8c9c0c-3201-45e7-a433-806d9dfc35eb -url http://localhost:9001/sites/PartnerN
    "%stsadm%" -o activatefeature -id be8c9c0c-3201-45e7-a433-806d9dfc35eb -url http://localhost:9001/sites/PartnerN/incidents
    "%stsadm%" -o activatefeature -id be8c9c0c-3201-45e7-a433-806d9dfc35eb -url http://localhost:9001/sites/PartnerN/orderexceptions
    
    
  2. Add entries to the partner directory. To do this, do the following:
    1. Browse to http://localhost:9001/sites/PartnerCentral.
    2. In the Quick Launch, click Sites.
    3. Click PartnerDirectory. The Site Directory page appears.
    4. Click the Partners tab.
    5. Click New.
    6. In the Sites: New Item form, enter the following information:
      1. In the Title field, enter PartnerN.
      2. In the Partner field, enter ContosoPartnerN.
      3. In the URL field, enter http://localhost:9001/sites/partnerN.
  3. Click OK.
  4. Add the Windows Users and Group. To do this, do the following:
    1. On the taskbar, click Start, point to Administrative Tools, and then click Computer Management. Expand the Local Users and Groups node.
    2. Right-click Users, and then click New User. Enter the following information:
      1. In the User name field, enter ContosoPartnerNUser6.
      2. Fill in the other text fields as you see fit.
      3. Clear the User mush change password in next login check box.
      4. Click Create.
      5. Repeat step 4 for users 7,8, and 9.
    3. Right-click Groups, and then click New Group. Enter the following information:
      1. In the Group name field, enter ContosoWinPartnerN.
      2. Click ADD. In the Members field, click each user that you created in the previous step.
      3. Click Create.
      4. Click Close.
  5. Run the following script to add the ContosoWinPartnerN permissions to the site collections, incidents site, and order exception site.
    REM Create PartnerN site, incidents web and orderexceptions web
    REM Replace PartnerN with respective Partner ex:PartnerN
    
    
    
    set domainName=%ComputerName%
    
    set stsadm=%CommonProgramFiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe
    
    if exist "%stsadm%" goto STSEnd
    stsadm=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe
    
    if exist "%stsadm%" goto STSEnd
    stsadm=C:\Program Files (x86)\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe
    :STSEnd
    
    REM Add ContosoWinPartnerN to partnerN site http://localhost:9001/sites/partnerN
    "%stsadm%" -o adduser  -url http://localhost:9001/sites/partnerN -userlogin %domainName%\ContosoWinPartnerN -useremail partnerN@SPG.com -role Design -username ContosoWinPartnerN
    REM Add ContosoFbaPartners to Default sites http://localhost:9001
    "%stsadm%" -o adduser  -url http://localhost:9001 -userlogin %domainName%\ContosoWinPartnerN -useremail partnerN@SPG.com -role Design -username ContosoWinPartnerN
    REM Add ContosoFbaPartners to Portal sites http://localhost:9001/sites/promotions
    "%stsadm%" -o adduser  -url http://localhost:9001/sites/promotions -userlogin %domainName%\ContosoWinPartnerN -useremail partnerN@SPG.com -role Design -username ContosoWinPartnerN
    REM Add ContosoFbaPartners to Portal sites http://localhost:9001/sites/productcatalog
    "%stsadm%" -o adduser  -url http://localhost:9001/sites/productcatalog -userlogin %domainName%\ContosoWinPartnerN -useremail partnerN@SPG.com -role Design -username ContosoWinPartnerN
    REM Add ContosoWinPartnerN into http://localhost:9001/sites/PartnerCentral
    "%stsadm%" -o adduser  -url http://localhost:9001/sites/PartnerCentral -userlogin %domainName%\ContosoWinPartnerN -useremail partnerN@SPG.com -role Read -username ContosoWinPartnerN
    
  6. Configure the Business Data Catalog access for ContosoWinPartnerN. To do this, do the following:
    1. Start Sharepoint3.0 Central Admininstration.
    2. In the Quick Launch, click ContosoSSP.
    3. Under Business Data Catalog, click View applications.
    4. Click ContosoProductCatalogService.
    5. Click Manage Permissions.
    6. Click Add Users/Groups.
    7. In the Users/Groups field, enter ContosoWinPartnerN. In the Choose Permissions area, select the check boxes for all four permissions (Edit, Execute, Select in Clients, and Set Permissions).
    8. Click Save.
    9. Select the ContosoWinPartnerN check box. Click Copy all permissions to descendants. In the Message from webpage dialog box, click OK.
  7. Add entries in SharePoint for the new Windows users. To do this, do the following:
    1. Start Sharepoint3.0 Central Administration.
    2. In the Quick Launch, click ContosoSSP.
    3. Click User profiles and properties.
    4. Click Add user profile.
    5. Enter the following information in the Add User Profile form:
      1. In the Account name field, enter either mydomain\ContosoPartnerNUser6 or myPCname\ContosoPartnerNUser6.
      2. In the Name field, enter either mydomain\ContosoPartnerNUser6 or myPCname\ContosoPartnerNUser6.
      3. In the Partner Id field, enter ContosoPartnerN.
    6. Click SaveandClose. The User Profiles and Properties page appears.
    7. Click View user profiles.
    8. In the ContosoPartnerNUser6 drop-down box, click Edit. Make sure that the Partner Id field contains the partner ID. If it does not, enter it. Click Save and Close.
    9. Repeat these steps for ContosoPartnerNUser7, 8, and 9.
  8. Modify the Contoso.LOB.Services data files to add sample data for PartnerN. Add new incident data in the \Source\PartnerPortal\Contoso.LOB.Services\App_Data\IncidentDataSet.xml file. Add new pricing data in the \Source\PartnerPortal\Contoso.LOB.Services\App_Data\PricingDataSet.xml file.
  9. Recompile the Contos.LOB.Services project.
  10. Navigate to http://localhost:9001/sites/PartnerN to see the new partner site.

The following procedure shows how to add the new partners to the forms-based authentication (FBA) membership database. This procedure is optional. Use it only if you want new partners to be able to use FBA. To do this, you must edit the membership database to create the new members and role. This requires that you use the Membership Seeder program, which is on CodePlex. This procedure does not explain how to use Membership Seeder. For more information, see Forms Authentication in SharePoint Products and Technologies (Part 1): Introduction on MSDN.

To use Membership Seeder to add the FBA members and role

  1. Add new data to the ContosoFBAdb database. (The ContosoFBAdb database is installed by the Partner Portal application's installation script. It is in the local\OFFICESERVERS SQL Server instance.) To do this, do the following:
    1. Open Membership Seeder, and then click Configure. In the dialog box, enter local\OFFICESERVERS. This is where the membership database is hosted. Save your changes, and then close Membership Seeder.
    2. Reopen Membership Seeder.
    3. In the Role field, enter ContosoFbaPartnerN.
    4. Add ContosoPartnerNUser6, 7,8, and 9 to the dbo.aspnet_Users table.
    5. Add the entry that maps the users to the role in the dbo.aspnet_UsersInRoles table.
  2. Run the following script to add ContsoFbaPartnerN permissions to the site collections and sites.
    REM Create PartnerN site, incidents web and orderexceptions web
    REM Replace PartnerN with respective Partner Number ex:Partner99
    
    
    
    set stsadm=%CommonProgramFiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe
    
    if exist "%stsadm%" goto STSEnd
    stsadm=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe
    
    if exist "%stsadm%" goto STSEnd
    stsadm=C:\Program Files (x86)\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe
    :STSEnd
    
    REM Add ContosoFbapartnerN to partnerN site http://localhost:9001/sites/partnerN
    "%stsadm%" -o adduser  -url http://localhost:9001/sites/partnerN -userlogin PartnerGroups:ContosoFbapartnerN -useremail partnerN@SPG.com -role Design -username ContosoFbapartnerN
    REM Add ContosoFbaPartners to Default sites http://localhost:9001
    "%stsadm%" -o adduser  -url http://localhost:9001 -userlogin PartnerGroups:ContosoFbapartnerN -useremail partnerN@SPG.com -role Design -username ContosoFbapartnerN
    REM Add ContosoFbaPartners to Portal sites http://localhost:9001/sites/promotions
    "%stsadm%" -o adduser  -url http://localhost:9001/sites/promotions -userlogin PartnerGroups:ContosoFbapartnerN -useremail partnerN@SPG.com -role Design -username ContosoFbapartnerN
    REM Add ContosoFbaPartners to Portal sites http://localhost:9001/sites/productcatalog
    "%stsadm%" -o adduser  -url http://localhost:9001/sites/productcatalog -userlogin PartnerGroups:ContosoFbapartnerN -useremail partnerN@SPG.com -role Design -username ContosoFbapartnerN
    REM Add ContosoFbapartnerN into http://localhost:9001/sites/PartnerCentral
            "%stsadm%" -o adduser  -url http://localhost:9001/sites/PartnerCentral -userlogin PartnerGroups:ContosoFbapartnerN -useremail partnerN@SPG.com -role Read -username ContosoFbapartnerN
    
  3. Configure the Business Data Catalog access for ContosoFbaPartnerN. To do this, do the following:
    1. Start Sharepoint 3.0 Central Administration.
    2. Click ContosoSSP.
    3. Under Business Data Catalog, click View applications.
    4. Click ContosoProductCatalogService.
    5. Click Manage Permissions.
    6. Click Add Users/Groups.
    7. In the Users/Groups field, type ContosoFbapartnerN. In the Choose Permissions area, select the check boxes for all four permissions (Edit, Execute, Select in Clients, and Set Permissions).
    8. Click Save.
    9. Select the ContosofbaPartnerN check box. Click Copy all permissions to descendants. In the Message from webpage dialog box, click OK.
  4. Add entries to User Profiles for new FBA partner users:
    1. Start Sharepoint3.0 Central Administration.
    2. Click ContosoSSP.
    3. Click User profiles and properties.
    4. Click Add user profile.
    5. Enter the following information in the Add User Profile form:
      1. In the Account name field, enter Partners:ContosoPartnerNUser6.
      2. In the Name field, enter Partners:ContosoPartnerNUser6.
    6. Click SaveandClose. The User Profiles and Properties page appears.
    7. Click View user profiles.
    8. In the ContosoPartnerNUser6 drop-down box, click Edit. In the Partner Id field, enter ContosoPartnerN.
    9. Click Save and Close.
    10. Repeat these steps for ContosoPartnerNUser7, 8, and 9.

Naming Conventions for the Procedures

The following naming conventions are used in the two procedures:

  • ContosoWinPartnerN. This is the local Windows group or the Active Directory domain group.
  • ContosoFbaPartnerN. This is the role in the ContosoFBAdb database.
  • Partners. This is the membership provider that is defined in the PeoplePickerWildcards element in the Web.config file that is used by SharePoint Central Administration.
  • PartnerN. This is used in three places. They are the following.
    • It is the site collection name and it is used in the site collection URL. For example, http://localhost:9001/sites/PartnerN.
    • It is used in the user profile in the Partner Id field.
    • It is used in the PartnerCentral\PartnerDirectory in the Title field.
  • ContosoPartnerN. This is used in four places. They are the following:
    • It is used in the Partner field in the page: http://localhost:8585/contoso.lob.web/CreateOrderExceptionSite.aspx.
    • It is used in the PartnerCentral\PartnerDirectory for the Partner field.
    • It is used in Source\PartnerPortal\Contoso.LOB.Services\App_Data\IncidentDataSet.xml file.
    • It is used in Source\PartnerPortal\Contoso.LOB.Services\App_Data\PricingDataSet.xml file.


Home page on MSDN | Community site

Show: