Tuesday, 17 July 2012

SharePoint 2013: Initial Thoughts

Some initial thoughts after skimming through all the material Microsoft posted here: http://www.microsoft.com/en-us/download/details.aspx?id=30361
Over all this release looks to be more about improvements and refinements.  It does not contain any major overhauls like the Service Application layer of SharePoint 2010.  That being said there are some exciting new features.

SharePoint 2010 == SharePoint 14 == 14 Mode
SharePoint 2013 == SharePoint 15 == 15 Mode

This version of SharePoint is built on .Net 4.0.  I suspect it is using the new .NET Web API for their REST web services.
Looks like it would be possible to have a Service Farm in the cloud being consumed by an on-prem SharePoint farm.  In SharePoint 15 they have removed the database permission required in cross farm sharing of service applications.
Single Web Application can now consume both local and remote services.

Service Applications:
The service application architecture is the largely the same as SharePoint 2010.
Web Analytics has been rolled into Search.
Office Web Applications is no longer a Service Application.  Instead it now requires its own set of VM(s).
New: App Management Service – To support SharePoint Apps from either the Market Place or Corporate Catalog
New: Translation Service:  Cloud based translation service for documents, pages and sites.
User Profile Application now includes the User Profile Replication Engine.  In 2010 this was a separate download required to replicate User Profiles and social to another farm.  This was very handy for Disaster Recovery.

Request Management:
SharePoint 15 provides the ability to route requests based on the following information:
·         Url
·         UrlReferrer
·         UserAgent
·         Host
·         IP
·         HttpMethod
·         SoapAction
·         CustomHeader

This could prove to be one of the most useful features of the new version.  This allows you to reject potentially malicious requests.  It could also allow you to route request to certain servers based on the data requested or the person who sent the request.  In a large organization this could allow you specify sets of servers to handle requests for certain departments.

Custom Code:
SharePoint 2013 will still handle Farm Solutions (same as 2007 & 2010) and Sandboxed solutions.  In addition it has added SP Apps.  This, apparently, will be the preferred method of deploying solutions to SharePoint 15.
SP Apps:  Not really sure how solutions are going to map to an app yet, but here some details on how an app will function:
·         One App == One Web == One URL
·         Only deploy Web Scoped Features (SPWeb)
·         App features are not available outside of the App
·         End users cannot manipulate the app web with SharePoint Designer or the browser
·         App Package will contain: Pages, Scripts, Styles and Manifest
·         App can be hosted on: A Developer Server, Azure, Any SharePoint server
·         A SharePoint farm can use Apps from the Market Place or from their private Corporate Catalog
·         Separate license for each app (The App Management Service will manage all these licenses)
·         Looks like web config must have Trust Level set to Full for apps to work
·         Can be built in the new version of Visual Studio

Looks like there have been some more improvements to the upgrade process from SharePoint 2010.  Most notably is there will be a SharePoint 2010 mode, like Visual Upgrade but more.  SharePoint 15 will have all the SharePoint 14 features, when in SharePoint 2010 mode the site (and all customizations) will still be running all the SharePoint 2010 code and features and all customizations will still live in the 14 hive, not the new 15 hive.
Preferred method for upgrade is the database attach method (same as 2010).  The following databases will support this method:
·         Content Databases
·         Project Database
·         Search Admin
·         Profile
·         Social
·         Managed Metadata
·         Secure Store

PowerShell Commands: Test-SPContentDatabase (same as 2010) and the new Repair-SPCotnentDatabase to fix the issue discovered in the Test-SPContentDatabase command.

A Site Collection Health check that will run before the upgrade to ensure everything is ok before upgrade.

Ability to create side by side copies, one in 14 mode and one in 15 mode that can be run at the same time.

You can also create new site collections in 14 mode.  This could come in handy during a migration.

Social:  Haven’t read too much about this, but the images look very similar to the NewsGator sites we’ve setup…

That’s it for now

Tuesday, 10 July 2012

SharePoint 2010 Install Error

During a recent install of SharePoint 2010 I got this error message:
An exception of type System.Security.Cryptography.CryptographicException was thrown…

There was a little more to it, but not really anything of help. 

I googled the error message and found many blogs that suggested giving Network Service full control over the 14 hive (SharePoint root).  This not only seemed like over kill but also a security hole, there is a good reason why the Network Service account does not have full control over the 14 hive.  

Not liking the popular fix, I dove in a little more and found a much easier and secure solution.

When you run the SharePoint 2010 Products and Technology wizard, be sure to right click and select “Run As Administrator”

…that’s it. 

Monday, 4 June 2012

Productively Wasting Time

Let’s all admit that the majority of stuff within Twitter is a waste of time.  Let’s also admit that there is no real compelling business case for adding a micro blog (Twitter style feed) to your corporate intranet.  Now that we're all on the same page, does that mean we just throw out the idea of the Social Enterprise or Enterprise 2.0? 

Of course not.  But this also doesn't mean that we throw the concept of ROI out the window either.  We all know that employees are going to waste some time throughout the day regardless of what you provide them with.  For some it's the coffee run, or the water cooler; for others it’s the first 10-15 minutes of a meeting they spend catching up on what's new and how's the family doing before getting down to work.  The point is they are already "wasting" time.  Or are they? 

As an enterprise you'll need to accept that the vast majority of posts on your corporate micro blog will not have any enterprise value.  But that is not to say they are worthless, they will have community value.  They will build connections between employees.  They help build a sense of community within your organization.  It will enable your employees to productively waste their time.

This sense of community will encourage people to share their lessons so the community does not have to repeat the same mistakes.  These lessons will not always be ground breaking but if they save some members of the community just 10 minutes, it adds up fast.  More importantly it spreads this tacit knowledge throughout the organization, where it can be built upon.  As they say a rising tide lifts all boats.

This sense of community can also encourage mentorship.  Your organization may already have a mentorship program in place, but generally this is only for a select few or people in the organization being groomed for high level management or C Level roles.  This makes sense as it takes time to be a mentor.  But what if one person can be a mentor to many?  That is another benefit of the social enterprise; it allows more people to take advantage of the stars within your organization.  It also removes the formality so the whole mentorship piece becomes more informal and more elastic taking advantage of the different strengths within your organization.

It also provides a way to recognize rising stars.  The old adage that it's not about what you know, but who you know goes out the window to a degree by allowing employees to raise their own flag.  The social enterprise empowers employees to show off their skills and knowledge.  It also provides a mechanism for their contributions to be recognized regardless of how well they play the politics game.

I think we all agree, regardless of where you are in the corporate tree, that a sense of community within an organization is very important.  It's difficult to put an ROI on taking your employees out for some drinks or a meal to celebrate an event.  But we have all accepted that although we may not be able to measure the value of a happy employee we know it's important and most people are happier when they have that sense of community.  The Social enterprise is simply building off what we already know about the importance of community.  By moving part of the community interaction online it enables employees to build connections with parts of their organization they may not have been exposed to before.  It also enables the organization to record that community knowledge and present it to a larger audience where it can be further built upon.  Where that path leads will be unpredictable.  What we do know is that when people share ideas, good things happen.  Maybe the question needs to be looked at from a different angle. Can you afford to not have your employees productively wasting their time?  Maybe there is business value in the Social Enterprise after all.

Saturday, 2 June 2012

Why would I share?

Enterprise 2.0 is  all about knowledge sharing.   The advantage of knowledge sharing for the enterprise is obvious, but what about the individuals?  What is in it for them?  Why would I share?

We are all taught from a young age the importance of sharing.   As we grow we are also taught there needs to be a balance.  After all you do not want to be taken advantage of.  Only share with people that are your friends, people that are nice to you, but don't give away everything.   In school it can be seen in the lunch room.  Sure it's nice to share a few chips from your lunch,  but you also need to make sure you don't go hungry.  As we get older, it moves to money.  Most of us are willing to share money with family, less money as the friendships grow less intimate,  but what happens when a stranger asks you to spare some change?

For many of us knowledge, in general, is a large part of our identify.  Our knowledge is what makes us unique, separates us from the pack.  In the enterprise our knowledge is our currency.  Knowledge gives an individual a competitive advantage over their peers.  There is a cost, in time and effort, to the individual in acquiring knowledge.  Their return on investment is the competitive advantage and recognition that the knowledge could bring.  Why give that up for free?  How do we still give people the return on the investment made on gaining knowledge while still encouraging them to share?

As you can see, which I'm sure is not a big surprise to anyone, there are some significant hurdles to overcome with user adoption.  The value in Enterprise 2.0 is only visible when users actually use the system.  In other words if no one is sharing there is no system.  So to drive adoption and see value from your investment in enterprise 2.0, you need to be able to answer the question: Why would I share?

If you’re a glass half full kind of person you will look at the above piece and point out that all I've shown is that people do indeed want to share.  They just need the correct environment to do it in.  How do we provide that?

It looks like your site must achieve two main goals:
  1. Provide a Return on Investment to the individual for their knowledge
  2. Establish and foster communities that provide the close relationships that truly drive sharing

If you step back and take a look at some of the more successful web 2.0 sites you'll notice these two items are very prominent.  One example is a site  like Stack Overflow that allows people to ask and answer questions on a variety of technical topics.  The site is leveraging existing communities that are already out there for these technologies, although does provide a platform for these isolated geographical communities to merge into a larger online one.  The site also provides users an ROI on their knowledge  by providing user recognition (badges).   It allows users to vote on answers provided by different people.  The more votes you get the more points you get, the more points the higher your ranking, the higher your ranking the more people will recognize you as a subject matter expert.  A different type of example is a site like LinkedIn.  LinkedIn allows you to build your own community by connecting to people that you know.  It also provides groups to allow people to ask and answer questions.  The difference here is on the ROI the system provides for knowledge sharing.  The ROI here is the ability to show your knowledge to potential employers as well as industry peers, to show yourself as a subject matter expert and give yourself a competitive advantage while also helping your community.

Why would I share?  Seems the answer is simple: To either help my community or to help myself, ideally both.  Does your Enterprise 2.0 site provide that?

Thursday, 10 May 2012

SharePoint 2010 Console App returns ErrorWebParts

On a recent upgrade project I needed to update the properties of a Content Query Web Part. Sounds easy enough, just need to whip a quick console app and away we go.

Coding went very quickly, but when I ran the app I couldn't get any Content Query Web Parts, they were all returned as"ErrorWebParts".

I consulted my good friend google and found this blog post [1]. This guy was having the same issue as me and discovered that this web part references a SPContext object, unfortunately from a console app there is no web-context.

After reading this, I modified my code to set the HTTPContext.Current and like magic, I was able to edit the properties of all the CQWP.
[1] http://sharepoint-insight.blogspot.com/2008/10/sharepoint-all-webparts-appear-as.html

SharePoint Content Query Web Part not returning all results

On a recent SharePoint 2010 migration project we noticed that when we created new items (pages in the pages library), the Content Query Web Parts did not immediately display the results.

This seemed very odd at first, as I had never noticed a delay before with these web parts, so my first thought was a migration issue. But why would a migration only cause the web part to work slower.

So with the help of my good friend Google, I was able to find a blog post [1] that offered the following:CQWP ignores the following items:
  1. Items are check-out
  2. Items are not published and not-approved

But I was hitting publish on the page, so my items would not have fallen into either of these categories...unless it was just a delay in SharePoint marking the item as published.

Following the advice in the same blog post, I wrote a console app that targeted all the CQWP and changed the "UseCache" property to false.

Just like magic the items I created are now showing up immediately in their respective CQWPs.

Keep in mind this may not be the best solution for a site with a high load or CQWPs that are running large queries. You'll need to weigh the benefits of performance against immediate results. In most cases users will understand if there is a small delay as long as they have an understanding of the situation.

[1] http://msmvps.com/blogs/laflour/archive/2008/12/24/why-content-query-web-part-cqwp-doesn-t-return-all-results.aspx

Monday, 7 May 2012

Real Time Search Results with SP Change Log

Search results are only as up to date as the index.

In most cases this small limitation is not an issue. No one really cares that there posted document or blog post will not show up in search results until the next crawl.

From a performance point of view this is a very small price to pay, compared to looping through the entire site with the SharePoint API to find the handful of documents that may not be in the index.
But what if the majority of your screens are search drive? What if the people using the site needed to see the documents the minute they are posted?

Earlier in the year we ran into that exact problem on one of our projects. Many users found it confusing when they would post a new item, but it would take at least 5 minutes before their item would show up on any screens. 

Very unintuitive. How do you know everything went well?

To solve this issue we looked into the SharePoint Change Log. The SharePoint Change Log was created to be able to target which items need to be added to the index. In SharePoint 2003, every incremental crawl needed almost a full crawl just to see what had changed. In MOSS and higher every change is recorded in the Change Log, the crawl then uses this log to add/remove items from the index.

As you can imagine this is a very powerful tool. We can use the Search results to get the vast majority of results, then using the Change Log we target exactly what items need to be add/removed from our screens.
Just like that, Real Time Search Results from SharePoint.

Migrating SharePoint MySites from 2007 to 2010

The MySites, for me anyways, are like the forgotten child of SharePoint. When migrating I put a lot of thought into how to move their existing site collections and solutions. What do they currently have setup in the SSP and how are we going to recreate them in the Service Application architecture of 2010. But I never put a lot of thought into how are we going to move the MySites?

On the surface this doesn't sound like a big deal. MySites are site collections like any other, simply built off a different template. Ideally they are hosted on their own Web Application and have their own separate content database(s); so what's the big deal?

This view isn't that far off, but there are a couple gotcha's that you need to consider before making the move:
  1. No Visual Upgrade option for MySites (or at least I couldn't find one). This means you will be forced to the 2010 Master Page.
  2. All Profile Properties are stored in the SSP database, not the MySite Database. Any custom properties, or any customized values will not be migrated over with just the MySites Content Database.
  3. Audiences are stored in the SSP. Web Parts referencing audiences will be referencing the GUID of the Audience, not the title. This makes it very difficult to just recreate your Audiences on the new environment.
The solution to the last two issues is to migrate over the SSP database as the profile database of the UserProfile Service Application in the SharePoint 2010 environment.

To do this you can use this PowerShell cmdlet to create the new user profile Service:
$ProfileGUID = New-SPProfileServiceApplication –Name [User Profile Name] –ApplicationPool [App Pool Name] –ProfileDBName [SSP Database] [1]

The above command will create a User Profile Service Application and upgrade the SSP Database. You can review the upgrade by looking at the Upgrade Status page. Next you'll need to run this command:
New-SPProfileApplicationProxy –Name [User Profile Proxy] –ServiceApplication $ProfileGUID [2]

Next up, the multi value User Properties do not come through right away. This, again, is due the new Service Application structure. The multi values were stored in the SSP in MOSS, but are now stored in the Managed Metadata Service in SharePoint 2010. Fortunately there is a handy PowerShell cmdlet that help map the Properties to the Managed Metadata Service:
Move-SPProfileManagedMetadataProperty -Identity [Profile Property] -ProfileApplicationProxy [GUID of User Profile Application Proxy] -AvailableForTagging -TermSetName [Term Set Name] [3]
I ran the above command against these properties:

Unfortunately, this command no longer works after you install the July CU or later [4]. If possible run this command after SP1, but before the CU.

Finally, I hope, there is the matter of the picture dimensions. In SharePoint 2010 they have changed things and now use three different sized pictures for the different areas of SharePoint. [5] When a user upload a picture SharePoint automatically creates these 3 different sized pictures. But what do we do about the pictures that already exist due to our migration? Once again it's powershell to the rescue. You'll need to run this cmdlet:
Update-SPProfilePhotoStore -MySiteHostLocation [URL to MySite Host] [6]

Now you should be able to open up this newly created User Profile Service Application. You should see that all your audiences, custom user profile properties and all the user profiles are all there.
To finish off this off, you will need to run a couple configuration steps:
  1. Start the User Profile Synchronization Service
  2. Re-Map any custom user profile properties to their AD property
  3. Configure Synchronization Connection and any filters
  4. Setup MySites
  5. Start Full Profile Synchronization
Now your upgraded MySites should be ready to use.

[1] http://technet.microsoft.com/en-us/library/ff608036.aspx
[2] http://technet.microsoft.com/en-us/library/ff607737.aspx
[3] http://technet.microsoft.com/en-us/library/ff608037.aspx
[4] http://blogs.technet.com/b/rycampbe/archive/2011/11/22/june-2011-cu-move-spprofilemanagedmetadataproperty-bug-and-the-workaround.aspx
[5] http://blogs.msdn.com/b/spsocial/archive/2011/01/07/photo-management-in-sharepoint-2010.aspx
[6] http://technet.microsoft.com/en-us/library/ff607547.aspx

Finally, High Availability for SharePoint 2010…

Disclaimer: I am not a database expert, nor have I had the chance to personally use SQL Server 2012

High availability has always been a bit of a pain for SharePoint. It sounds easy enough. For the presentation layer just add more Web Front End Servers. For the Application layer just add more application servers and run the Service Applications on multiple servers. But what about the database?

In the past the main options here were either clustering, mirroring or log shipping. Each one of these options was good at something's, but they all had their share of limitations. For instance clustering was great on the server side, but all the servers in the cluster shared the same storage; mirroring provided separate storage, but you could only have one mirror; log shipping provided multiple replicas and separate storage, but is a very manual process. Then to top it off both log shipping and mirroring do not allow any access to the mirror or replica databases. As you can see none of these options make for a great solution.

Recently Microsoft released SQL Server 2012. As you expect this contains some great new features. Here is a link to a MSDN blog with the top 10 new features for SharePoint:

As you can see there are some neat things SharePoint can now take advantage of. The one I want to focus on is Always On.

Always On now promises to provide us with a true High Availability option for the data tier. It appears that Always On has combined the best of Clustering with the best of Mirroring. Always On allows you to setup a single DNS entry into a cluster of multiple SQL Servers, but it allows for each SQL Server node to have its own storage. It also has another nifty feature of being able to create Availability Groups. Availability Groups allow you to logically group databases that fail over together. Allowing you set different levels of high availability for different SharePoint farms within the same Always On cluster. This is huge from a licensing point of view as it allows you even more flexibility within shared SQL Servers, while still being able to provide the level of redundancy required by the business. Finally as an added bonus the fail over nodes are left in a read only mode. This allows us to report off the fail over nodes rather than going against live node when required.

What I'm still uncertain about is how this all works with the Service Application databases within SharePoint 2010. Many of the SharePoint 2010 Service Application database do not support either Log Shipping or Mirroring <Shameless Plug>To find out which Service Application databases are supported by either Log Shipping or Mirroring, see the SharePoint Reference Architecture document </Shameless Plug>. My hunch is that since they put a lot of time in making this feel like a clustering solution (that doesn't require shared storage) is that all the Service Application databases would all be supported within Always On. But as always we will need someone to test it first before we can know for sure.

In any event, if you are designing a High Availability solution consider using SQL Server 2012 and let us all know how it goes.