Windows SharePoint Services 3.0 Notes

  • Microsoft has posted videos of several Office Developers Conference 2006 sessions which cover SharePoint development.
  • To put a SharePoint site into debug mode, set the following values in its web.config file:
    1. configuration.SharePoint.SafeMode.CallStack = “true”
    2. configuration.system.web.customErrors.mode=”Off”
    3. configuration.system.web.compilation.debug=”true”
  • Setting up WSPBuiler workflows to run under WSS (rather than MOSS) a few extra steps.
  • Theme assets go in:
    C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES

    You also need to add the theme to

    C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033\SPTHEMES.XML

    And theme thumbnails go in

    C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES

    When creating a new theme, you need to do an iisreset on the SharePoint server.

    When updating a theme, you need to go to each site using the theme, apply a different theme, and then apply the theme you changed to get changes to stick. (If anyone knows a better way of doing this, I’d like to know–I have about 12 sites/subsites all using the same theme and have had to change the theme CSS on occasion.)

  • Here’s how I was able to move a SharePoint database from one server to another:

    1. Back up the database (either in SQL Server Management Studio or SharePoint Central Admin).
    2. Restore the database from backup through SQL Server Management Studio.
    3. Make sure that the account you’re using to run SharePoint Central Admin has db_owner permission for the database.
    4. Create a new web application in SharePoint Central Admin.
    5. Remove the empty content database from the new web application.
    6. Add the database you just restored to the new web application.
    7. Run iisreset.
    8. As long as the same versions of the Web Parts you are using are deployed to the new site, you shouldn’t require any further configuration in this area.
  • If you’re going to use Forms Authentication with the ActiveDirectoryMembershipProvider, make sure that the user account SharePoint is using to do AD queries has the following permissions set in AD itself. (Otherwise, SharePoint won’t be able to check the names you enter, and so you won’t be able to enter any new users.)

    • Users container: Read all properties
    • Users container: User objects: Read all properties
    • Users container: InetOrgPerson objects: Read whenCreated

    You may be able to get by with fewer permissions, but this is what I ended up with through trial and error (and log file checking). Here’s how to set these:

    1. Click on the object you want to set permissions for and go to Properties.
    2. Click on the Security tab.
    3. Click the “Advanced…” button.
    4. On the Permissions tab, click “Add…”
    5. Select the user account SharePoint is using to connect to AD.
    6. Click the Properties tab.
    7. Select which object this permission should apply to, and select which permissions should be granted.
  • So my previously posted list of steps to change the service account SharePoint runs under was pretty incomplete… and far more manual than it needed to be. Turns out Microsoft actually has a support article on how to do this.
  • Some Content Types (like the Calendar’s Event) can’t be used as the basis for other types directly because they’re in a hidden Content Type Group. There is a way to change this, however:
    1. Create a calendar
    2. Under “Advanced Settings,” allow management of content types for the calendar.
    3. On the calendar settings page, click on the “Event” content type.
    4. On the next page, click on the parent “Event” content type.
    5. Under Settings, click “Name, description, and group.”
    6. Change the group from “_Hidden” to something else.
  • For extra security, SharePoint can be configured to disallow code blocks in page code. If you’re going to be running on a production server that will have this enabled, it’s a good idea to configure your server the same way. Description of how to do this.
  • If managing timer jobs starts throwing 403 errors, don’t delete the cache directory throwing the “access denied” exception, instead give the WSS_WPG user full control permissions.