Blog

You are browsing the archive for SharePoint 2010.

Loading SharePoint Dlls into Reflector

February 23, 2010

As a developer, I like to load all of Microsoft’s SharePoint DLLs into Reflector so I can peek under the hood when needed. Just follow these easy steps to load all the SharePoint DLLs into reflector:

1. Open a Powershell command shell

2. Make a temporary directory or use an existing one. I’ll use \usr\tmp\ in this example.

3. cd to \windows\assembly\GAC_MSIL, then run the following command:

4. dir | select-string “Microsoft.SharePoint” | foreach {cd $_\14*;cp .\*.dll \usr\tmp\; cd ..\..\; }

5. Now all SharePoint DLLs will be in \usr\tmp. Just open Reflector, browse to \usr\tmp and add the list of assemblies (shift click to select all).

Happy Reflecting :)

Changes in SharePoint DesignerTypes for workflow activity parameters

October 23, 2009

Creating a workflow in SharePoint Designer consists of selecting Conditions and Activities to build the logic and determine what actions the workflow performs. When you select an activity or condition a sentence appears in the WorkFlow Designer screen with underlined phrases that allow you click on them to set the workflow’s parameters. These parameters can be selecting a column on a list item and a value to give it, or they can be a user’s account name, a url to a site or something more complex like an email definition that includes a To address, CC address, a subject and a body.

When creating custom workflow activities and conditions for SharePoint in Visual Studio, you create a code class to build its functionality as well as a .actions file, both of which define the parameters. SharePoint Designer uses the .actions to be able to add the activity or condition to a workflow. You must specify the type for each parameter within both the class and the .actions file as well as the DesignerType in the .actions file. When a user clicks on a parameter, different windows open to allow the user to input the values according to the DesignerType given to the parameter. The DesignerType is simply an enumeration that SharePoint Designer uses to determine what type of form to display to gather information on each parameter. For example, a DesignerType of DropDown will present a drop down menu at the location of the parameter phrase in the sentence, whereas a DesignerType of Email will open a pop up window with fields for the To address, CC address, Subject and Body where each of these fields is defined as a parameter of different types in code and returned from the Designer form as an object of that type.

For an activity to send an email, the simple class definition may look something like this:


public partial class SendAnEmail : SequenceActivity
{
   #region Dependency Properties

   public static DependencyProperty __ContextProperty = DependencyProperty.Register("__Context", typeof(WorkflowContext), typeof(SendAnEmail));
   public static DependencyProperty RecipientCCProperty = DependencyProperty.Register("RecipientCC", typeof(ArrayList), typeof(SendAnEmail));
   public static DependencyProperty RecipientFromProperty = DependencyProperty.Register("RecipientFrom", typeof(string), typeof(SendAnEmail));
   public static DependencyProperty RecipientTOProperty = DependencyProperty.Register("RecipientTO", typeof(ArrayList), typeof(SendAnEmail));
   public static DependencyProperty SubjectProperty = DependencyProperty.Register("Subject", typeof (string), typeof (SendAnEmail));
   public static DependencyProperty BodyProperty = DependencyProperty.Register("Body", typeof(string), typeof(SendAnEmail));

   #endregion

   public SendAnEmail()
   {
      InitializeComponent();
   }

   #region Activity Parameters

   [Description("Recipient address")]
   [Browsable(true)]
   [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
   public ArrayList RecipientTO
   {
      get { return ((ArrayList) (base.GetValue(RecipientTOProperty))); }
      set { base.SetValue(RecipientTOProperty, value); }
   }

   [Description("Carbon copy recipient")]
   [Browsable(true)]
   [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
   public ArrayList RecipientCC
   {
      get { return ((ArrayList) (base.GetValue(RecipientCCProperty))); }
      set { base.SetValue(RecipientCCProperty, value); }
   }

   [Description("Subject")]
   [Browsable(true)]
   [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
   public string Subject
   {
      get { return ((string) (base.GetValue(SubjectProperty))); }
      set { base.SetValue(SubjectProperty, value); }
   }

   [Description("HTML Body")]
   [Browsable(true)]
   [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
   public string Body
   {
      get { return ((string) (base.GetValue(BodyProperty))); }
      set { base.SetValue(BodyProperty, value); }
   }

   [Browsable(true)]
   [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
   public WorkflowContext __Context
   {
      get { return ((WorkflowContext) (base.GetValue(__ContextProperty))); }
      set { base.SetValue(__ContextProperty, value); }
   }

   [Description("Sender address. If this value is not specified, default sharepoint sender address will be used")]
   [Browsable(true)]
   [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
   public string RecipientFrom
   {
      get { return ((string) (base.GetValue(RecipientFromProperty))); }
      set { base.SetValue(RecipientFromProperty, value); }
   }

   #endregion

   protected override ActivityExecutionStatus OnExecute(ActivityExecutionContext executionContext, Microsoft.SharePoint.Workflow.ISharePointService service)
   {
   }
}

The .actions file would look like:


<?xml version="1.0" encoding="utf-8"?>
<WorkflowInfo Language="en-us">
   <Actions Sequential="then" Parallel="and">
      <Action Name="Send E-mail Extended" ClassName="SPSolutions.SharePoint.WorkflowEssentials.Activities.SendEmailExtended" Assembly="SPSolutions.SharePoint.WorkflowEssentials, Version=1.0.0.0, Culture=neutral, PublicKeyToken=08a33cc09f006379" AppliesTo="all" Category="SharePoint Solutions' WorkFlow Essentials">
         <RuleDesigner Sentence="Send a %1 e-mail to %2 and display %3 as the sender">
            <FieldBind Field="IsMessageUrgent" DesignerType="Dropdown" Text="choose" Id="1">
               <Option Name="urgent" Value="true"/>
               <Option Name="non urgent" Value="false"/>
            </FieldBind>
            <FieldBind Field="RecipientTO,RecipientCC,Subject,Body" Text="this address" DesignerType="Email" Id="2"/>
            <FieldBind Field="RecipientFrom" Text="this address" Id="3" DesignerType="stringbuilder" />
         </RuleDesigner>
         <Parameters>
            <Parameter Name="__Context" Type="Microsoft.SharePoint.WorkflowActions.WorkflowContext, Microsoft.SharePoint.WorkflowActions" Direction="In"/>
            <Parameter Name="IsMessageUrgent" Type="System.String, mscorlib" Direction="In" InitialValue="false" />
            <Parameter Name="RecipientTO" Type="System.Collections.ArrayList, mscorlib" Direction="In" />
            <Parameter Name="RecipientCC" Type="System.Collections.ArrayList, mscorlib" Direction="Optional" />
            <Parameter Name="RecipientFrom" Type="System.String, mscorlib" Direction="In" />
            <Parameter Name="Subject" Type="System.String, mscorlib" Direction="In" />
            <Parameter Name="Body" Type="System.String, mscorlib" Direction="In" />
         </Parameters>
      </Action>
   </Actions>
</WorkflowInfo>

In terms of SharePoint 2010, there are several new DesignerTypes and some of the existing ones have changed slightly in the types of parameters that they return. Below is an overview of most, if not all, of the DesignerTypes included in 2010.

 Designer Type 
   
 New to 2010 
   
 Parameter(s) returned
(example parameter name) 
   
 Parameter type 
   
 Description 
 Assignment       Yes       AssignedTo       System.String       
             CC       System.Collections.ArrayList       
             Comments       System.String       
             Subject       System.String       
             Duration       System.Double       
             DurationUnit       Microsoft.Office.Workflow.Actions.DurationUnit       
             DueDate       System.DateTime       
 Boolean       No       Yes/No       System.Boolean       
 ChooseDocLibItem       No       DocumentLibrary
ItemName 
     System.String       Selects list item from a Document Library based on a field value. 
 ChooseListItem       Changed       ListId       System.String       Selects List Item from list based on a field value. 
             ListItem       Microsoft.SharePoint.Workflow.SPItemKey       
 ContentType       Yes       ContentTypeID       System.String       
 CreateListItem       No                   
 DataSourceDropDown       Yes       DataSourceName       System.String       Drop Down list of DataSources for list associated with workflow. 
 Date       No       Date       System.DateTime       Date Time Selector 
 Dependent       Yes            S ystem.String       Based on TextArea DesignerType 
 DropDown       No             System.String       
 Email       No       To       System.Collection.ArrayList       
             CC       System.Collection.ArrayList       
             Subject       System.String       
             Body       System.String       
 Hide       No                   Used to hide parameter from users in Designer 
 FieldNames       No       FieldName       System.String       Select field column from list associated with workflow. 
 Float       No             System.Float       
 HyperLink       No       Link       System.String       
 Integer       No             System.Int32       
 ListItems       Yes             System.String       
 ListNames       No       ListTitle       System.String       Drop Down with list of list names from current site 
 Operator       No                   Drop-down list box control that includes operators used to evaluate each side of the RuleDesigner sentence. Operators are static and must be added in Options elements. 
 ParameterNames       No             System.String       Allows the creation of a new variable for the workflow. 
 Person       No       Users       System.Collections.ArrayList       Allows selection of multiple users 
 SinglePerson       Changed             System.Object       Allows selection of a single user 
 StringBuilder       No             System.String       
 Survey       No                   Creates a task in the workflow to gather data from users. 
 TaskSummary       Yes       TaskProcessName       System.String       
 Text       No             System.Object       
 TextArea       No             System.String       
 UpdateListItem       No       ListItemToUpdate             
 WritableFieldNames       No             System.String       Drop down including list of fields on list that are writable 

So far, the main changes appear in the return types of the ChooseListItem and SinglePerson DesignerTypes. In SharePoint 2010, the SinglePerson form returns a generic System.Object rather than a string, and the ChooseListItem’s ListItem parameter returns a new type of SPItemKey instead of a string.

To accommodate the return of an Object from the SinglePerson DesignerType form, simple define the parameter as System.Object in the .actions file and the DependencyProperty in code, then define the activities property as a String and explicitly convert it from object to string in the get statement.

The new .actions file section would now look like:

<Action Name="myNewActivity"
 ClassName="SPSolutions.SharePoint.WorkflowEssentials.Activities. myNewActivity "
 Assembly="SPSolutions.SharePoint.WorkflowEssentials, Version=1.0.0.0, Culture=neutral,
 PublicKeyToken=08a33cc09f006379"
 AppliesTo="all" Category="SharePoint Solutions' WorkFlow Essentials">
   <RuleDesigner Sentence="Get %1">
     <FieldBind Field="SharePointUser" DesignerType="SinglePerson" Text="this person" Id="1" />
   </RuleDesigner>
   <Parameters>
     <Parameter Name="__Context" Type="Microsoft.SharePoint.WorkflowActions.WorkflowContext,
      Microsoft.SharePoint.WorkflowActions" Direction="In"/>
     <Parameter Name="ListId" Type="System.String, mscorlib" Direction="In" />
     <Parameter Name="SharePointUser" Type="System.Object, mscorlib" Direction="In" />
   </Parameters>
 </Action>

The new declaration in the class for parameters returned from the ChooseListItem DesignerType would now look like:

public static DependencyProperty SharePointUserProperty =
DependencyProperty.Register("SharePointUser", typeof(object), typeof(myNewActivity));
[Description("SharePoint User")]
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public string SharePointUser
{
   get { return ((string) (base.GetValue(SharePointUserProperty))); }
   set { base.SetValue(SharePointUserProperty, value); }
}

The SPItemKey type appears to be a wrapper for returning an instance of the list item. It has two public properties: Id as Int32 and Key as String where the Id is the selected ListItem’s Id and Key is the name. You can programmatically get an instance of the SPListItem by passing the SPList object as a parameter to SPItemKey.GetItemByIdFromList(SPList).

Public Members for Microsoft.SharePoint.Workflow.SPItemKey

Constructors
 SPItemKey()       Returns object with Key = string.Empty, Id = -1 
 SPItemKey(Int32 id)       Returns object with Key = id.ToString(), Id = id 
 SPItemKey(string key)       Returns object with Key = key, Id =Int32.Parse(key) 
Methods
 Equals(object rhs)       Boolean       Determines if current object equals object passed in 
 Equals(object objA, object objB)       Boolean       Determines if two objects are equal 
 Finalize()       Void       Empty override of base System.Object.Finalize() 
 FromItem(SPListItem listItem)       SPItemKey       Returns SPItemKey object given SPListItem 
 GetHashCode()       Int32       Generated from Exclusive OR operation between Id and Key.GetHashCode() 
 GetItemByIdFromList(SPList)       SPItemKey       Returns SPListItem from given list from Key or Id property 
 GetType()       Type       Returns Type for current SPItemKey 
 IsEmpty(SPItemKey)       Boolean       Static. Returns true if both Id and Key properties are null or if Id = -1 and Key is null or string.Empty 
 MemberwiseClone()       Object       Creates a shallow copy of the current SPItemKey 
 op_Equality(SPItemKey lhs, object rhs)       Boolean       Static. Determines if SPItemKey and Object are both null or equal 
 op_Equality(SPItemKey lhs, SPItemKey rhs)       Boolean       Static. Determines if two SPItemKey objects are both null or equal 
 op_Inequality(SPItemKey lhs, object rhs)       Boolean       Static. Determines if SPItemKey and Object are both not null or not equal 
 op_Inequality(SPItemKey lhs, SPItemKey rhs)       Boolean       Static. Determines if two SPItemKey objects are both not null or not equal 
 ReferenceEquals(object objA, object objB)       Boolean       Static. Determines if two objects are references to the same object 
 ToString()       String       Comma separated string: Key, Id 
Properties
 Empty       SPItemKey       Static. Returns empty object using empty constructor 
 Id       Int32       Read/Write. Id of SPItemKey 
 Key       String       Read/Write. Key of SPItemKey 

To access the new type in your class, be sure to reference the new assemblies for SharePoint 14 including C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\ISAPI\Microsoft.SharePoint.dll and C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\ISAPI\Microsoft.SharePoint.WorkflowActions.dll.

The new .actions file section would now look like:

<Action Name="myNewActivity"
 ClassName="SPSolutions.SharePoint.WorkflowEssentials.Activities. myNewActivity"
 Assembly="SPSolutions.SharePoint.WorkflowEssentials, Version=1.0.0.0, Culture=neutral,
 PublicKeyToken=08a33cc09f006379"
 AppliesTo="all" Category="SharePoint Solutions' WorkFlow Essentials">
   <RuleDesigner Sentence="Get %1">
     <FieldBind Field="ListId, ListItem" DesignerType="ChooseListItem" Text="List Item" Id="1" />
   </RuleDesigner>
   <Parameters>
     <Parameter Name="__Context" Type="Microsoft.SharePoint.WorkflowActions.WorkflowContext,
      Microsoft.SharePoint.WorkflowActions" Direction="In"/>
     <Parameter Name="ListId" Type="System.String, mscorlib" Direction="In" />
     <Parameter Name="ListItem" Type="Microsoft.SharePoint.Workflow.SPItemKey, Microsoft.SharePoint" Direction="In" />
   </Parameters>
</Action>


The new declaration in the class for parameters returned from the ChooseListItem DesignerType would now look like:

public static DependencyProperty ListIdProperty = DependencyProperty.Register("ListId", typeof(string), typeof(myNewActivity));
[Description("List Id")]
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public string ListId
{
   get { return ((string) (base.GetValue(ListIdProperty))); }
   set { base.SetValue(ListIdProperty, value); }
}

public static DependencyProperty ListItemProperty = DependencyProperty.Register("ListItem", typeof(SPItemKey), typeof(myNewActivity));
[Description("List Item")]
[Browsable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
public SPItemKey ListItem
{
   get { return ((SPItemKey) (base.GetValue(ListItemProperty))); }
   set { base.SetValue(ListItemProperty, value); }
}

Looking at the SharePoint 14 codebase, there are several new activities included in the namespace Microsoft.SharePoint.WorkflowActions.WithKey that use the SPItemKey object includng the same ListItem property as well as additional properties such as TaskId. It appears that the workflow activities in the new version of SharePoint uses this object extensively for List Items, probably as a smaller object to pass around instead of the full SPListItem object. It will be interesting to see how, if at all, this object changes in the beta release.

Deploying and Upgrading to Project Server 2010

October 21, 2009

These are some notes from a helpful session today at the SharePoint Conference 2009 in Las Vegas delivered by Christophe Fiessinger and Jan Kalis from the Microsoft Project Server team.  The notes are as organized as I can make them while I’m sitting here in the room, but they will of course not be as polished as I’d like them to be.  I’ve decided to err on the side of more information – less polish.

What exactly is Project Server 2010, anyway?  To put it as simply as possible, it is meant to provide project and portfolio management on a large scale.  That means collaboration, schedule and resource management, and reporting.

We got some good news and some bad news.  Project Server now requires the full version of SharePoint 2010, not just the free Foundation product.  However, out of the box, the Project 2010 Professional client program can sync with any SharePoint task list.  So, you may not always need Project Server to share and collaborate on projects and integrate with the full client.  Project Server includes the ribbon interface to simplify matters, and allows you to do much of the simple day-to-day entries and changes through the web interface.  The new enhancements in Excel Services, Performance Point Services, and other SharePoint reporting pieces provide excellent BI capabilities.

Project Server now functions as an add-on service application in SharePoint 2010.  There is therefore a lot of flexibility in farm topology, and it is now fully compatible with load-balancing and high-availability.  It no longer uses ActiveX, meaning you don’t have to touch desktops for upgrades and updates.

System Requirements:

  • Same as SharePoint 2010, plus
  • SharePoint 2010 Enterprise
  • Project Professional 2007 / 2010
  • Excel 2007 / 2010
  • IE 7 or 8 (other browsers not supported)
  • Exchange 2007 (optional, but server to server integration is now available)
  • Team Foundation Server 2010 (optional, but it is now integrated OOTB too)

Deployment Process

  1. OS / updates
  2. SQL Server / updates
  3. SharePoint Server 2010 (not included with Project Server anymore)
  4. Project Server 2010
  5. SharePoint Configuration Wizard and Farm Configuration Wizard
    (Minimum Service Applications:  Project Server, Excel Services, Performance Point Services, Secure Store Service, State Service (for charting))
  6. Central Admin Configuration
  7. Project Web Access Admin Configuration
    (Time reporting periods for time tracking, base security by roles, Cube Building Service, Exchange integration)

PowerShell is supported through the entire process.

Should SharePoint and Project be run in separate farms or separate?  Depends…

Together:

  • Server consolidation
  • Administration and maintenance
  • Leverage high availability and line of business integration
  • But, update testing is more complex
  • SharePoint Admins need more training
  • Additional licenses required if the farm is large (Project will require a license on every server in the farm)

Separate

  • Isolated update requirements
  • No dependency on intranet farm availability
  • Change management is simpler
  • Security isolation
  • Can still share a SQL server
  • But, additional administrative tasks
  • Duplicate governance

Capacity planning will not be terribly different than the 2007 version, although the new service applications that are available may affect the performance if you enable them all.

Upgrading

Do not skip the normal, boring analysis of your existing environment.  Project Server is complex and needs to be tested.

Project Server 2003 needs to be migrated via 2007, although it does not have to be brought all the way to production.

Project Portfolio Server 2006 / 2007 has 3 options:

  1. Map functionality, develop desired functionality on 2010, and then use the gateway to transfer the data.
  2. Finish existing projects in PPS 2007, and start new projects in 2010.
  3. Use side-by-side with Project Server 2010, syncing via the gateway.

Project Server 2007 is direct and streamlined OOTB, with two options:

  1. In-place Upgrade (remember 64-bit is required for SharePoint 2010, though)
  2. 4 or 5 Database Attach (the upgrade occurs during PWA provisioning)

Backward Compatibility Mode is automatically enabled in all cases after upgrade, which allows 2007 Project Pro SP2 clients to work seamlessly.  Project Pro 2003 or older clients are just out of luck.  Multiple client versions on the same PC are supported as long as they are not running at the same time.  Backward Compatibility Mode makes it possible to attack the server and client upgrades separately.  You should always do the server first, because the 2010 client will not work with the 2007 server product.  Once all clients are up to 2010, backward compatibility can be turned off so that full functionality becomes available.  Here’s what is suppressed in Backward Compatibility Mode:

  • Manually scheduled tasks are not available on the server or client
  • Tasks cannot be set to Inactive
  • Font strikethrough not available
  • All Departmental custom fields enforced on Project Professional 2007

The 2010 file format has changed, and older client versions will not be able to open the new files.  The only way to convert or use them is to download the Project Pro 2010 Trial product.  This is due to the fundamental changes the Manual Scheduling introduces into project plans.  Opening these files in prior versions would be confusing or misleading to 2007 users, even if a converter was provided.

Externalizing BLOB Storage in SharePoint 2010

October 21, 2009

These are some notes from a helpful session today at the SharePoint Conference 2009 in Las Vegas delivered by Srini and Burzhin (I typed too slowly to get their last names), product engineers from Microsoft.  The notes are as organized as I can make them while I’m sitting here in the room, but they will of course not be as polished as I’d like them to be.  I’ve decided to err on the side of more information – less polish. In the interest of full-disclosure, this is a pretty new topic for me personally.  Therefore, it is possible that some of these notes represent things a bit differently than how the presenters intended.  The RBS team blog is available here: http://blogs.msdn.com/sqlrbs to find things in their own words.

BLOBs are Binary Large OBjects – a container of unstructured bytes of data.  SharePoint data that is not meta-data (documents – most other list items are completely meta-data) is stored in BLOBs in SQL databases.  BLOBs typically account for 60-70% of all content storage.  Most SharePoint operations act against the meta-data, not the BLOB data – until you go to click on the link and open the document.  By default, BLOB data is stored in the content database with the meta-data.

This model works well, but it does have some pain points.  SQL storage is inherently expensive, especially if it’s on a SAN.  The more data existing in SQL, the more performance load there to retrieve it.  Large data sets are slow to backup and recover.  SQL data is difficult to guarantee retention and deletion for compliance.  So…, Remote BLOB Storage (RBS) will solve all of our problems and bring about world peace by allowing us to store BLOB data outside of our content databases.

Previously with 2007, EBS (External BLOB Storage) meant that third-party providers were responsible for both managing external BLOB storage and creating the API libraries to interface with SharePoint.  The objective now is for SharePoint, itself to provide a common set of API libraries to do so.  The result is a downloadable add-in component that can be registered for a SharePoint farm via the SQL 2008 R2 Feature Pack (see below).  EBS is supported in 2010, but is deprecated.  Migration from EBS to RBS can be performed via PowerShell commands.

RBS is fully managed code, can be scoped to individual content databases (instead of at the farm level), can be configured and managed via PowerShell, supports many providers (including third-party), and supports migration both ways.  It ships with a native RBS FileStream store provider.

From the user’s perspective, SharePoint 2010 does all of the dancing transparently.  They’ll never know something is different.

From the administrator’s perspective, there are new PowerShell cmdlets that talk to the relevant SQL stored procedures for installing, configuring, provisioning, and maintaining RBS.

From the third-party provider view ,there is now no need to write the BLOB store libraries. 

Implementation

The RBS add-in must be installed first in SQL (the SQL RBS 2008 R2 with FILESTREAM Provider)

RBS and Provider DLLs must be installed on all WFEs

RBS must be enabled and configured using PowerShell:

  • site.contentdatabases.rbssettings.enabled
  • GetProviderNames
  • SetActiveProvider (1 BLOB store to many content database)
  • Migrate (copy entire BLOBs in or out of the db with no downtime)

Backup and Restore

This will by necessity be more complicated with multiple stores for SharePoint.  However, it is workable by following some simple restores.

  1. Always start SQL backups first (the windows can overlap)
  2. Always start BLOB restores first (the windows can overlap)

A longer BLOB retention policy can make it realistic to back it up less frequently than your SQL backups.  The RBS Maintainer keeps track of deletions and propagates them to the BLOB store.  Deletions don’t have to be concurrent from SharePoint to BLOB.  You should retain BLOBs long enough to allow you to restore the previous version of the content database without also restoring the BLOB store.

Performance

RBS seems to add little to no performance overhead in internal Microsoft testing with 128 users.  In fact, with larger files – it may have a slight advantage.  Third party providers may vary a bit, but are expected to cause no more than a 5 – 10% degradation and less for larger files.

Deploying SharePoint 2010 Extranet

October 21, 2009

These are some notes from a session today at the SharePoint Conference 2009 in Las Vegas delivered by Ryan McMinn, an Access Services guy at Microsoft.  It was nice to get more specific information about getting FBA to work, but it was also a little frustrating to not get much information about setting up SharePoint to trust external claims providers.  It’s touted as the best answer for partner collaboration, and I anticipate it to be a big winner for sites the interact with large numbers of individual contributors (think LiveID users), and earlier sessions pointed to this one as having all of the implementation details – but it seems like most of we get are concepts and generalities so far.  The notes are as organized as I can make them while I’m sitting here in the room, but they will of course not be as polished as I’d like them to be.  I’ve decided to err on the side of more information – less polish. 

Design Considerations and Business Requirements

  • Account Management
  • Network Access and entry points
  • Single Sign On
  • Information Disclosure
  • Antivirus
  • Rich Client Experience

Target Audiences

Remote Employees – Need to use their internal identity.  Need access to Line of Business apps, collaboration, and publishing content.

Partners – Need to use both internal and / or external identities.  Need access to limited sites and data (no other partner data).

Vendors and Customers – Need to use external identity.  Need access to targeted and segmented content for collaboration and / or publishing content.

We must also think about zones and Alternate Access Mappings (or host named site collections).  The Default zone should be the most secure (SSL), because it is the fallback zone in case of problems

Authentication Issues

Claims Based Authentication can use Windows Integrated, Forms Based (ASP.Net or LDAP), or SAML.  When you create a web application, you pick between Windows Classic or Claims Based.  You can still use separate zones for different authentication methods.  However, if you choose Claims, then multi authentication can be used in the same zone (as long as they use the same protocol – HTTP or HTTPS).  This is much like what Outlook does with RPC over HTTP (using Windows Integrated when possible, and prompting when not).  The authentication page first asks which method you want to use for login.  This happens in the browser or in the rich Office clients.

There is not yet any documentation about how to configure the SharePoint STS to trust external claims providers such as LiveID or external federated domains.  The short version is that they must be installed into the store, and then PowerShell commands are used to register them for use.  Microsoft requests us not to go into production with Beta2 Claims Based functionality, but will provide instructions to test it there and wants us to do so.

There are some specific steps necessary to make FBA work in 2010.

  1. Setup the authentication provider
  2. Setup the web app to use the authentication provider
  3. Add authentication provider to the web.config files of:
    • Central Admin
    • Web Application
    • STS

This can be done via PowerShell (if you are upgrading an existing web application you should do this BEFORE attaching the database for upgrade).

  1. new-spauthenticationprovider –aspnetmembershipprovider “membership” –aspnetroleprovidername “rolemanager”
  2. new-spwebapplication –name “my web app” –applicationpool “claims app pool” –applicationpoolaccount “domain\appool” –url http://servername –port 80 –authenticationprovider “membership”

ForeFront Unified Access Gateway 2010 (formerly IAG, Intelligent Application Gateway, which apparently is the yet again renamed replacement for ISA 2006) allows you to leverage existing servers without replication, a DMZ, or more servers.  It uses wizards to publish sites, do link translation, supports AAM, and path blocking.  It can also apply more specific rules (upload, download, edit…) based on identity, role, and endpoint device (corporate desktop vs. home PC).  It can also handle authentication with multiple directories and 2-factor tools, and provides excellent single-sign-on.

Forefront Identity Manager 2010 synchronizes identities and passwords across systems, automates user provisioning and management, and can be used to delegate this ability to partners.

Forefront Protection for SharePoint 2010 scans for viruses and malware, filters inappropriate content, and notifies administrators for infractions.

Develop Advanced Access Web Databases and Publish to SharePoint

October 21, 2009

These are some notes from a REALLY great session today at the SharePoint Conference 2009 in Las Vegas delivered by Ryan McMinn, an Access Services guy at Microsoft.  Lots of good, detailed information here.  The notes are as organized as I can make them while I’m sitting here in the room, but they will of course not be as polished as I’d like them to be.  I’ve decided to err on the side of more information – less polish.

This is a follow-up to a more basic session on building apps yesterday (which I didn’t attend).  Access has long been valued by business users for its rapid application development capabilities.  It’s also been hated by many IT people for its lack of security, management, and disaster recovery.  Since the 2007 version, Access and SharePoint have been friendly with each other.  Now however,fully integrating Access via SharePoint 2010’s Access Services addresses IT’s concerns and actually makes it more powerful for business users at the same time.

A big emphasis has been put on providing database templates to help people get started, including community templates uploaded to Microsoft from you and me.  One of the OOTB ones is a ‘Web database’.

Miscellaneous Access Client Improvements

Building table schema in datasheet view is easier now, as the column headings allow you to pick the data type on the fly.

Data Models are groups of fields you can create and insert as a group.

Data Types allow you to insert common calculated fields along with the fields they reference.

The Macro writer has been amped up to be almost like working in the VBA editor, but still maintaining the low-security-required environment for web publishing.  This adds enhanced capabilities to do full If Then Else structures, comments, parameters with full Intellisense.

The new Web Browser Control allows you to show web content in your forms by parameter-based URLs.

Publishing to Access Services

You do this in Backstage (Office menu > Info; or Office menu > Share)

Tables turn into lists, forms turn into aspx pages, reports turn into rdl files (Rptg Svcs), and macros turn into workflows.

It creates all of this in its own sub-site.

Full web functionality is only available on native Access lists that are moved up to SharePoint.  External lists are usable in the full Access client, but not via web forms.  This is true even if you are leveraging BCS to bring that data into SharePoint.

You can also save your database design as templates that get saved into SharePoint as wsp solution files.

Macros are great for:

Change validation

Change tracking

Notification

Workflow

Aggregates (doing them this way gives better performance that queries)

Bulk updates

Custom calculations

There are Before * data macros that trigger before the database is updated.  They are meant to be quick, and are good for validation.

After * data macros trigger after the change is committed to the database.  They can be much longer, looping, firing other macros…

Named data macros are not triggered automatically, but are called by other macros or button clicks.  Functionality is expanded like the After * data macros.

Using Enterprise Content Types and Managed Taxonomies in SharePoint 2010

October 21, 2009

These are some notes from a REALLY great session today at the SharePoint Conference 2009 in Las Vegas delivered by Daniel Kogan, the Metadata Service Program Manager at Microsoft.  Lots of good, detailed information here.  The notes are as organized as I can make them while I’m sitting here in the room, but they will of course not be as polished as I’d like them to be.  I’ve decided to err on the side of more information – less polish.

Our content types are now free to roam throughout the enterprise!  We also now get the ability to standardize and manage our meta-data tagging easily across different content types, usage scenarios, and storage locations.  Now, tags can be hierarchical just like your site or folder structure.  They can also be localized by language.

There are several questions we need to consider when we begin to contemplate this type of standardization.  They are similar concerns to what we had to consider when planning content types and site columns within a site collection, but obviously the issues can be far more complex when the scope increases across the enterprise.

Is it the same?

Does this have the same structure, policies, defaults everywhere in the enterprise?  Are things of content type “A” always the same?

What is it?

Do I trust it, recognize it?

Where is it?

Searching, navigating…

What happens to it?

Retention, workflow…

 

Terminology:

Hub – A site collection designated as a “souce” from which we share content types

CT Syndication – Publishing, sharing, pushing one or more content types across site collection, web app, and farm boundaries

Taxonomy – a hierarchical tree

Folksonomy – informal flat list of adhoc values

Term Store – DB that contains taxonomies

Groups – a security boundary within the term store and above the term set

Term set – a hierarchical section in the term store that contains many individual terms – e.g. Months, or Regions. (max 1000 total per store)

Term – a node in the taxomy with an ID and many text labels (30,000 per term set, max 1million total)

Tagging – applying metadata to an item (authoritative or social)

Keywords – not just a text string, a reference to a node in the hierarchical term store.  This is particularly powerful, standardizing tags for future use.  As you enter keywords, a suggestion list displays showing the entries in the hierarchy.

 

Content Type Syndication

  • Each Metadata Service app can publish through a maximum of 1 hub
  • It is not a requirement to syndicate or consume from the service
  • Content Type with all corresponding columns, policies, and workflow association
  • From the hub, you can publish, unpublish, republish, and roll up errors
  • From the consuming side you can extend, derive, view errors, refresh from the hub

If you are working on the service in Central Admin, it is created with whatever name you like – configuring where the hub site collection is.  Then a connection service is used to consume from the original service.

If you are working in the hub, you can simply go to the Content Type gallery, click the type and choose to Manage publishing…  In the background, the Metadata Service creates a cab file that is versioned.  So the consuming web apps, site collections, and farms can check regularly for new versions of subscribed content types.

On the consuming side, it shows up like a normal content type – but it’s read-only.

Applying Metadata

Web Browser – Edit Properties, by a business process, location-based (inherit by virtue of where it is stored)

Rich Client – DIP, Backstage (Office menu > Info).  The Office client fetches the term set when it opens the document, so that recently added terms are available.

Once the meta-data has been entered using the term store, the column headings AND left-hand navigation displays the tag taxonomy as a means of filtering or pivoting the library listing.  If that doesn’t create a mental picture for you, it’s kind of like automatic, faceted, dynamic folder trees based on tags.

Managed Metadata columns are like a ‘super choice’ field that looks up in the hierarchical term store and filters exclusively or inclusively.  The user can even add entries to an ‘open term set’, while ‘closed term sets’ are owned by someone and closed to others.

Managed Keyword columns are like a ‘super text’ field where the user can type, and they are given suggestions from the term store.  If their entry doesn’t exist, the system will add it automatically.

 

The Term Store Management Tool

You find this at Home > Site Settings > Site Administration > Term Store Management

This tool allows you to access  all available term stores, to copy, reuse, merge, delete… individual terms.  Merges ripple through all the millions of documents that use them, and the two are now synonyms of each other (including any natural abbreviations).

SharePoint 2010 Upgrade Part 2: Advanced Scenarios

October 20, 2009

These are some notes from a great session today at the SharePoint Conference 2009 in Las Vegas delivered by Sean Livingston, the Upgrade Program Manager at Microsoft.  Lots of good, detailed information here.  The notes are as organized as I can make them while I’m sitting here in the room, but they will of course not be as polished as I’d like them to be.  I’ve decided to err on the side of more information – less polish.  Basic upgrade process and tools information was presented in part 1.  (My notes for that session are here.)

The Upgrade Team worked within a specific Upgrade Philosophy that included the following tenets:

  • Detect issues early, both in O12 and at start of upgrade.
  • Keep the administrators informed as to issues and next steps.
  • No data loss.
  • Minimize downtime
  • Continue when possible (when errors are not fatal, log an error and move on)
  • Be reentrant (prevent catastrophic failures that cause complete restoration)

Upgrade Sequence

Stage 1:  Boot strap

  1. Config db
  2. Admin content db
  3. Pre-joined farm
  4. Join farm

Stage 2:  Central Admin

  1. Local farm
  2. Admin web service
  3. Admin web application
  4. SPIISSite objects
  5. Admin content db > Web Templates, Features Upgrade, SPSites

Stage 3:  User Data (performed by a Timer Job ASAP.  This prevents problems if the admin’s Terminal Server session times out and logs off.)

  1. Local farm
  2. SharedResourceProvider12 Objects > Partner stuff
  3. ???? (didn’t type fast enough…)
  4. Content databases > Web templates, Features upgrade, SPSites

Within these steps come many smaller actions.  Each of these are marked as successful when complete within the object schema.  If the upgrade is restarted, it resumes after the last successful action in each sequence.

The further you are from the current patch level, the longer the upgrade will take, because it has to perform those actions now.

Miscellaneous

  • V2V upgrade DBs set to simple recovery to maximize performance (may not happen in Beta 2)
    So, don’t do any log shipping or mirroring during upgrade.
  • DB growth during upgrade (2 to 3 times the normal size including the log)
    • Manually shrink database after upgrade
    • There will be a Health Rule that looks for DBs with large amounts of free space
  • SQL timeouts are removed (if SQL server is still up)
  • Version Path fallback logic (if dependencies are not in the 14 hive, look in the 12, if not there look in 60)
  • Object locking has been reworked to allow multiple db upgrades to run concurrently without interfering with each other (checks for stale locks every 2 minutes)

Read-Only Content Databases allow you to upgrade a copy of the databases on the new farm while users access content.

  • This is only for Content Databases
  • Must be at least 2007 SP2
  • SharePoint reads SQL database lock settings and proactively applies site collection locks so the users don’t see edit functionality in GUI
  • If traffic is high, you may need to duplicate your SQL server for the upgrade to have enough resources

Parallel Upgrade used to be done via separate temporary farms.  Now it can be done in separate command windows on the same server.  Microsoft internal testing has found that a single true SQL server can handle up to about 8 concurrent upgrade threads.  If you’re doing it in a limited VM environment, it’s probably more like 2 or 3.

AAM Redirection can now be used with the Content DB Attach upgrade, but it should be seen as the approach of last resort.  This can only be as granular as your content databases are.  It is complex and requires URL changes which means link fixup will be needed and not all clients will understand the changes.

The planning process before you attempt an upgrade should include many things:

  • Gather information
    • Pre-upgrade checker
    • WinDiff
      • New server with same version and patch level
      • Compare Web Server Extensions directory
      • Compare IIS directory
      • Compare GAC directory
  • Determine impact (stsadm –o EnumAllWebs)
  • House-cleaning
    • Stale sites and webs
    • Old document versions
    • Templates, features, and web parts
    • Repair data issues
      • stsadm –o database repair
      • stsadm –o deletelist
  • Collect customizations
    • Gather original installation media
    • stsadm –o ExportIPFSAdminObjects
  • Test the upgrade
    • Don’t ignore warnings and errors in logs
    • Use real datasets
    • Similar hardware
    • FBA will need to have some changes ALWAYS in your web.config files
      • For the web app
      • For Central Admin
      • For the Security Token Service
    • Make sure you test in both UI modes

Surprisingly, upgrade performance is more affected by number of sites, webs, lists… than it is by database size.  Hardware limitations are also key.

When the upgrade is finished, there are some manual things you will likely need to do.

  • FBA configuration
  • Unghosted pages
  • Over wide lists (too many columns)
  • Site templates and list templates will not come forward in the upgrade
    Instances built from the templates are fine, just the templates don’t upgrade.  You will need to recreate the templates (best practice is to do this as user solutions instead of .stp files)

If upgrade fails (hypothetically, of course), the following sequence is recommended for troubleshooting:

  1. Go to status page
  2. Go to error log
  3. Go to full upgrade log (the correlation ID from the error screen is helpful to find the relevant log entries)
  4. Test-SPContentDatabase
  5. stsadm –o enumallwebs
  6. Fix issues
  7. Restart your upgrade

SharePoint 2010 Upgrade Part 1: Fundamentals

October 20, 2009

These are some notes from a great session today at the SharePoint Conference 2009 in Las Vegas delivered by Sean Livingston, the Upgrade Program Manager at Microsoft.  The notes are as organized as I can make them while I’m sitting here in the room, but they will of course not be as polished as I’d like them to be.  I’ve decided to err on the side of more information – less polish.  There will be another session immediately following about advanced upgrade scenarios – so stay tuned.

Let’s start with some quick reference information:

Supported Scenarios

  • In-Place
  • Database Attach – Probably the most common to be used
  • Single Click Install (Basic install w/ WID to SQL Express 2008)

Unsupported Scenarios

  • Upgrade from earlier than WSS v2 SP2 / MOSS 2007 SP2
  • Direct upgrade from WSS v2 / SPS 2003 or earlier
  • Side by side installation
  • Gradual upgrade (although AAM redirection is still possible, see next session)

There are several preparation tools that come bundled with 2007 SP2 (enhanced in October 2009 CU) to get you ready to upgrade:

  • stsadm –o preupgradecheck (-localonly if you want to run against individual servers)
  • stsadm –o EnumAllWebs (10/09 version includes features, event receivers, and web parts activated per web)
  • SPDiag V2 (in the Admin Toolkit)
  • stsadm –o ExportIPFSAdminObjects (for customizations like admin-approved InfoPath Form templates)

The preupgrade check looks for many things and reports on them.  This is done without editing the databases, and the operation is not required before upgrade – both of which are changes from the 2003 > 2007 prescan operation.

  • Informational
    • Farm servers and databases
    • AAM Configuration
    • Lists, Site Definitions (with instance counts), Features, Web Parts, Event Receivers to match up GUIDs and find missing elements
    • FBA configuration (FBA will have to be reconfigured in 2010, think web.configs…)
    • Installed Language Packs
    • CAML views/CAML content types
  • Issues
    • Missing Site Definitions, Features, Assemblies
    • Data orphans
    • Modified content databases

There are also some new tools available in 2010 to help from the new server:

Test-SPContentDatabase

  • Complements the pre-upgrade check
  • Compares against a specific web application to look for missing dependencies
  • Scans both 12 and 14 databases

Upgrade-SPContentDatabase

  • Will resume an upgrade process (B2B or V2V) already in progress
  • This DOES NOT attach a database (contrary to the Beta review document distributed in hard-copy at the conference)
    • Attaching is done by stsadm –o addcontentdb, or
    • Mount-SPContentDatabase (NOTE: Until RTM, this one will force the UI upgrade to 14)
  • Upgrade-SPEnterpriseSearchServiceApplication

The new Visual Upgrade Capability by default upgrades using the old Office 12 UI.  It does this by including all of the old master pages and CSS sheets in the new version.  Admins / Owners are then able to do a temporary preview of the new UI, and / or do a final UI upgrade to the new look and feel.

  • Farm admin or site collection admin controlled
    • Web level setting
  • Preview mode is not meant for extensive changes
  • Web parts can now be UI version aware to make them automatically render differently per instance
  • Some items are not O12 compatible
    • MySite host
    • Project Web Access site collection
    • Report Server web parts

Patch Management has been overhauled, basically because it stunk in many ways in 2007.  2010 now has:

  • A new UI
  • A new PowerShell cmdlet
  • New Health Rules
  • Backwards compatibility mode
    • Binaries can be ahead of the database(s)
    • Defer upgrade for short period of time
    • Not intended for long delay (maybe weeks or days)

There are multiple downtime mitigation techniques that can be used to minimize the effect of the upgrade process on end users.  Some of these are valid for both 2007 and 2010, and others are only in 2010:

Both

  • Read-only databases (kind of, the UI just trims all of the edit functionality)
  • Parallel upgrade farms
  • Gradual Upgrade

2010 only

  • Single server, multiple db upgrade sessions (works consistently well up to 2 sessions on the same disk spindle, for more you will need to test)
  • Content database with AAM redirection

Upgrade logging has also been improved to help us trouble-shoot potential errors and warnings.

  • One upgrade log per session
  • Errors only log
  • Predictable structure for log
  • Improved status page
  • New history page
  • Command line progress indication

Shared Service Providers each get upgraded into separate service applications, and new databases are created as needed.

Claims Based Identity in SharePoint 2010

October 20, 2009

These are some notes from a conceptual session today at the SharePoint Conference 2009 in Las Vegas delivered by Venke Veeraraghavan from Microsoft.  The notes are as organized as I can make them while I’m sitting here in the room, but they will of course not be as polished as I’d like them to be.  I’ve decided to err on the side of more information – less polish.  There is a later session that focuses on implementation details, so there will be more specific notes to follow.

Claims Based Identity is similar to Kerberos in many respects, but it extends similar benefits (and more) to non-Windows accounts.  It involves a trusted authority issuing a token (like a ticket) to a user as they log in.  This token can then be used to authorize access to whatever other system trusts the same authority.  From a SharePoint perspective, it is basically a way to offload / delegate the management of user accounts, profiles, and authentication for your portal users to a third-party.  It is a not a replacement for FBA, but a framework under which FBA can be one of the methods used to authenticate and authorize users.  Since Claims Based Identity is a flexible, framework based on standard SAML tokens – SharePoint doesn’t have to write compatibility with external protocols or identity providers. 

SharePoint 2010 is also now able to assign access permissions based on claims (roughly parallel to attributes) as read from the token.  That’s a lot more flexibility than we used to have.  It seems similar to what we found when working with the Audience Targeting features in 2007, where we could dynamically filter items based on profile properties.  Those prior features were not truly for security – just filtering.  Now, claims allow us to apply actual permissions based on similar criteria instead of strictly using users and groups.

Office client applications are now also able to support non-Windows Integrated Authentication.

There are 2 Important Identity Problems in SharePoint

Sign-In

There are 2 modes for authentication in SharePoint 2010:

  • Classic (NT Token) or
  • Claims (NT Token | FBA, SAL, LDAP… | SAML Token)

Claims creates a SAML token based on the sign-in, that contains the user’s identity

An IP-STS (Identity Provider Security Token Service) processes logins and manages attributes.  It creates a token and passes it to the user for them to present to the SharePoint STS.

The SharePoint STS (Security Token Service) verifies that the IP-STS creating the token (or FBA login) is trusted by SharePoint as configured by the farm administrators.  It then issues its own token incorporating the identity information from the first, and also adds whatever SharePoint-specific attributes might be necessary or desired.

Services

How do we use the identity outside of SharePoint?

  • LOB systems
  • External partner services
  • Separate SharePoint farms

Claims allow us to accomplish more portability than Kerberos does.  Especially now with the Service Application Architecture, this enables much easier and more efficient ways to share services granularly across farms.  The SharePoint STS runs on every WFE and App server, and examines / trusts the STS on other servers as configured.

Other notes

In Beta2, Claims will be partially supported.  Here’s the list of what IS included:

  • Windows-Classic
  • FBA-Claims
  • Anonymous
  • FBA-Claims + Anonymous

 

The following modes will NOT be ready yet:

  • Windows Claims
  • SAML-Claims

These modes should be included in the RTM version.