I just came home from a great trip to Singapore and the Southeast Asia SharePoint conference. It has been a great adventure travelling that far and meet so many SharePoint fans, Southeast Asia is really hot. The conference has been perfectly arranged by Debbie, Randy and Steve at a great location. Thank you! A new conference in the area was announced during the closing session, and if I'm allowed I'll gladly come back! Hopefully I can spend a few more days here in Singapore then. One thing that really stood out in this conference part from the actual SharePoint content, the speakers and the great people here was the great local food for dinner and tea breaks - love it! As always great to see the real person behind the tweets and the twitter images.
I had two sessions for this conference; Playing in the Sandbox and SharePoint + Silverlight, new BFFs. Both sessions had a good number of attendees and I want to thank those who attended and came up with good questions. If you missed the sessions or just want to see the slides one more time you will find them below. I also have a download of the source code of the demos below.
Here's a collection of a few images that I shot during the conference:
Here are the presentations on Slideshare:
If you want to download the demos and code produced during the session here is a ZIP file with the most interesting parts: SPCSEA-Demos.zip.
Today Microsoft released a bunch of external Search connectors for their search products such as SharePoint Server, FAST and Search Server or for clients such as Windows 7. The external search connectors are based on the OpenSearch specification, so it's quite easy to integrate with whatever product you like.
These are the new released connectors:
- Business Week
- Encyclopedia Britannica
- Google Blog Search
- Google News
- MSDN Search
- TechNet Search
- The Register
- Yahoo Images
- Yahoo News
Using the connectors in Windows 7
To use the connectors in Windows 7 all you have to do is download the OSDX file and click on it. It will bring up a dialog as below - and after that you are good to go and search using Explorer.
Adding connectors to SharePoint
To add the connector to SharePoint Server or Search Server then download the FLD file (Federated Location Definition). After that go to Central Administration and select to manage the Search service application. In the Search Service application choose Federated Locations in the menu on the left hand side. Then click on the Import Location button and use the Browse button to find the FLD file you downloaded. Once you're done click on the Done button unless you want to change the definition manually or enter any credentials.
To see the results from the federated location you need to modify your Search Center. Just edit the results page and add the Federated Results Web Part (from the Search category). Then choose to Edit the Web Part properties through the Web Part menu. In the drop down choose the federated location that you would like to use.
Save the page and try it out. It just as simple as this.
This years SharePoint and Exchange Conference, the seventh in order, took place this week. For the second year I was there as a speaker and had just as great time as last year. It is currently the largest conference in Scandinavia focusing on SharePoint and Exchange technologies and its growing for each year.
Göran Husman (MVP) and Beatrice from Humandata has done an excellent job in putting this conference together and finding such good speakers; both national and international. Thank you!
The conference had some extra icing this year with presentations about three brand new Microsoft products; Internet Explorer 9, Windows Phone 7 and Xbox Kinect. All I can say is that I'm all in - amazing stuff!
I presented two sessions; Playing in the SharePoint Sandbox and KPI for the People. Thanks to everyone attending and for the interesting questions. Funny thing is with us Swedes that the interesting questions always comes after the session, we're quite shy over here... As promised below are my presentation slides (all powered with Office Web Apps).
User Group meeting
A couple of weeks ago we had the Sweden SharePoint User Group meeting at the Microsoft HQ in Akalla. It was good to see such crowd even that far out of town. It was a really good to listen to Pontus Haglund introducing the new Microsoft Lync.
I did a session about Visio and Visio Services and my presentation can be found below.
KPI for the People
Playing in the Sandbox
Here is the third part of my Visual guide to Windows Live ID authentication in SharePoint 2010. This part takes off just where we ended the last part. If you haven't read part 1 and part 2 then make sure to read them through before continuing.
Submitting site for compliance
In order to get your INT site into the PROD/production environment you need to make sure that your site follows the compliance rules. If you do not follow the rules then you will not be able to run your site using the "normal" Live ID accounts. The compliance criteria and verification cases can be found at the MSM site as Word or PDF format. Note that this document is dated way back in 2006 so some things are quite outdated. Here is a short but not complete summary of the compliance criteria:
- Must work with Internet Explorer 6.0 or later (don't think this one is valid though, since I got my SharePoint 2010 site approved - aim for IE7+ support)
- A link to your Privacy statement must exist on the first page and this privacy statement must include a link to the Windows Live ID privacy statement
- All first-level pages must have a valid and functional Sign In text or valid Live ID Sign In button
- There must be a Sign Out link (or image) when logged in
- Windows Live ID must be correctly spelled and have the trademark symbol at first mention
If you are going to use images for the Sign In and Sign Out links - you must use the official ones. And you must have them point to the original location.
Once you believe that you meet the criteria's it is time to submit it for approval. In the MSM site go to your site and select Submit for compliance.
This link takes you to a wizard where you have a link to the compliance criteria and verification cases documents. The wizard has two pages. On the first page choose Yes in the drop down (if you meet the compliance requirements). Then click Next
The second requires you to enter information about your site, test environment and anticipated launch date. You also have to option to write some notes to the tester. Once you have entered the information click Submit.
When you're done you should see a message that the site is successfully submitted.
Now all you have to do is wait for a response from the tester. This can take anything between two days to two weeks. While you are waiting you can see the current status of your site in the MSM site. The image below shows that; (1) your site is pending, (2) you cannot longer submit it for compliance and (3) it is not yet submitted to production (this is the next step).
You will receive answer after some time and it can either be negative or positive. I've actually had some problems at first - the tester did not see the standard (OOTB) Sign In link in SharePoint 2010 (probably due to the 115% zoom bug in SP2010). But once it was approved I received an email like this:
Submitting for production
When you are approved but before you can use the site in the PROD environment you need to go back to the MSM site and submit the site into production. This is done on the manage site page. The Site Details will look like this before submitting to production.
To submit the site to the PROD environment choose the Submit Site Properties to Production link in the Tasks below the Site Details:
Once you have clicked that link you will be asked to specify the production environment details. The most important thing is to change the DNS Name. As said in part 1 you must use a URN instead of a URL. If you have a URN like this
urn:wictorslivesite:intthen create a URN looking like this for production:
When you are done click Submit and on the next page verify that all your properties are valid. Once you are ready click the Yes button to finalize the submission to the PROD environment.
The Site Details should look like this when everything is set and done.
Configuring the PROD site
Enough of fiddling in the MSM site - let's take on SharePoint 2010 instead. These steps are pretty much the same as for when configuring the INT site - with the difference that we use another certificate, the new DNS Name, a new login URL and new accounts.
First you need to get the PROD certificate. Go to https://nexus.passport.com/federationmetadata2/2007-06/federationmetadata.xml and extract the signing certificate. Copy the inner text of the X509Certificate element into an empty Notepad document and save it as LiveID.cer.
Start a new MMC session and add the Certificates snap in. Import this certificate into the same three locations as you did with the INT certificate; Trusted Root Certificates, Trusted People and SharePoint. Make sure to do this on ALL WFE and application servers in your SharePoint farm.
Note that you do not need to remove the INT certificate if you are using the same farm/servers for PROD and INT.
Next is to fire up PowerShell and do basically the same procedure as for the INT site. The difference is highlighted in red below:
1: asnp microsoft.sharepoint.powershell 2: $realm = "urn:wictorslivesite:prod" 3: $certfile = "C:\Temp\LiveID.cer" 4: $rootcert = Get-PfxCertificate $certfile 5: New-SPTrustedRootAuthority "Live ID Root Authority" -Certificate $rootcert 6: $emailclaim = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/claims/EmailAddress" -IncomingClaimTypeDisplayName "http://schemas.xmlsoap.org/claims/EmailAddress" -SameAsIncoming 7: $upnclaim = New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier" -IncomingClaimTypeDisplayName "UPN" -LocalClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn" 8: $authp = New-SPTrustedIdentityTokenIssuer -Name "LiveID" -Description "LiveID" -Realm $realm -ImportTrustCertificate $certfile -ClaimsMappings $emailclaim,$upnclaim -SignInUrl "https://login.live.com/login.srf" -IdentifierClaim "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"
On line 2 you must use the PROD DNS Name/URN. On line 3 you need to use the newly created Live ID certificate On line 5 use a different name of the trusted root authority, compared to the INT site On line 8 when creating the trusted identity provider specify a different name (than the INT provider) and use the PROD Sign In Url.
Then go to Central Administration on your site and select the Web Application that will use the Live ID. Configure the authentication providers to use the new trusted identity provider. If it is the same web application uncheck the INT provider before checking the PROD provider and save your edits.
Only one thing more to do. The INT and PROD environments uses different Unique User Identifiers for the logins. If Live ID is your only authentication provider you need to configure a new site collection administrator for your site collections. You can find the Unique ID on the Live ID Account Overview page.
Use that ID and append @live.com and use that when configuring your site collection admins:
That's it - you are now running your SharePoint 2010 site using Windows Live ID login! Use the same procedure as in part 2 to assign permissions to all users out there...
This also sums up this series on configuring SharePoint 2010 for usage with Windows Live ID. I hope that you enjoyed it and avoids falling into some of the traps that I did along the road. Possibly (but not guaranteed) I will have some follow-ups on this series with some more troubleshooting and interesting tidbits found on my journey!
Keep on SharePointing!
Oh, and if your in Singapore next week for the Southeast Asia SharePoint Conference just come by and say hello and I'll give you some great discount on my SharePoint book - SharePoint 2010 Web Parts in Action.
Recently came across a really interesting bug in SharePoint 2010. It's when you are trying to upload multiple files using the ActiveX control, where you can drag and drop files or select multiple files. I started receiving "Object reference not set to an instance of an object" exceptions from the STSUpld control. The usual Google, ahem, Bing check revealed nothing. Just that I was not alone having this problem (hence this post).
The strange thing is that this only appeared on some sites and on some computers. After some fiddling around I noticed that it actually only happened on sites where I used a custom master page. My initial thought was that this had something to do with invalid HTML or missing delegate controls - but everything was just fine (alright then, I actually found a missing end div tag, but that didn't solve it).
So I pulled out the almighty Reflector tool and checked the STSUpld.UploadCtl.GetFormInformation method to see what could possibly go wrong there. By inspecting the code for possible situations where a NullReferenceException could be thrown I found a couple of places where this is not checked for (ouch!):
- The control needs a hidden
inputelement with the ID destination This one was there, I did not touch the upload.aspx file - and you should not either!
- This destination field must have a value This is populated by the code behind
- The control needs an
inputelement of the type
AccessKeyattribute set to "O" For the OK button (might be different in other languages than English)
- The control needs an
inputelement of the type
AccessKeyattribute set to "C" For the Cancel button (might be different in other languages than English)
inputelement of the type
buttonmust have the
AccessKeyvalue set to non empty The control iterates through all input elements looking for the AccessKey to find the OK and Cancel buttons. In my case this was the one playing games with me!
The final point above was the thing that caused the NullReferenceException in the multiple upload control. In this case I had a few input elements with the type button without any
AccessKeyattributes in my master page (let's not go into why they are there...). Nevertheless once I added the AccessKey attribute with a non-empty value the upload worked like a charm. Note that setting
AccessKey=""causes the same exception, you need to set a value for it for instance;
What can we learn from this! You should always check for null! Can't be said too many times. Calling ToString() on objects without checking for null is the eight deadly sin.
PS: I think this post is worthy of a KB article, Microsoft? At least as a patch in upcoming Office updates...
- The control needs a hidden
An intense Twitter conversation initiated by Fabian about how Managed Metadata is updated in SharePoint 2010 gave me the idea to note down a few interesting bits about the Taxonomy Fields and how they work within a Site Collection. I hope/guess that Fabian will write a good post (as usual) about his findings as well.
The possibility to tag documents in SharePoint is one of my favorite features and one of the reasons that I think you should move to SharePoint 2010 as soon as possible. As every new function added to the huge SharePoint spectrum I have an urge to dive deep into these new additions to really know how to use them fully. I've spent some time with the Managed Metadata Service Application and the taxonomy fields used with it. I can't say it has been a smooth ride all the way - but digging into the actual bits and understanding how it all works made it a whole lot easier. And you know what - why keep everything a secret!
Taxonomy Fields are Lookup columns!
Yes, you heard it right! It is a smart and clever implementation from the SharePoint Team (some say the opposite though). In order to get performance from the taxonomy and managed metadata fields all used keywords and terms within that Site Collection is stored in a hidden list (in the top-level root site).
If you've read my previous posts about how to create Taxonomy Site Columns you've probably seen that we use two different fields; one of the type TaxonomyFieldType and one hidden using the type Note. And when defining a field of the type TaxonomyFieldType we need to specify a reference to a list called TaxonomyHiddenList.
This hidden list contains all used keywords and terms for the Site Collection and SharePoint uses this list for fast retrieval of the labels of the keyword and terms. You can find the list either by just browsing to /Lists/TaxonomyHiddenList, use SharePoint Designer to get the list id from the Site Properties (see image to the right) or use SharePoint Manager 2010.
If we take a look at the columns in that list we will see that it contains a number of interesting things. The first interesting columns are the IdFor* (1-3). IdForTermStore (1) is the Guid of the term store used to store this term and IdForTerm (2) is the Guid for the term. Keywords doesn't belong to a term set so the IdForTermSet (3) is an empty Guid, while managed metadata terms have a Guid corresponding to the term set.
Also worth noticing here is that the hidden list also contains the localized labels. I have the French language pack installed, so I can see both the English (4) term and path as well as the French one (5).
SharePoint uses this list as a lookup column so that it does not have to query the Managed Metadata Service all the time, but instead just looks it up in the local Site Collection.
You need proof?
Ok, let's make a really sample scenario. I have one document with Enterprise Keywords and a Managed Metadata column like this:
Let's change the Term1033 column in the hidden taxonomy list to all uppercase letters and save the list item.
When the list is reloaded you will immediately see that the column value has changed to the value we updated in the hidden list:
What happens if I delete one of the items in the hidden list?
As you probably guessed, it was removed from the file. Let's look at the document from another point of view - the edit properties view!
What! As you can see: the term for which I changed the label is back to it's normal state, but the deleted one is still missing (and it is permanently). What's really happening here is that when in edit mode the taxonomy fields queries the Managed Metadata service directly - it does not use the local hidden list.
So, how do I get it back to where it were? The short answer is you can't. But by default every hour a timer job is executed. It is called Taxonomy Update Scheduler, and it's job is to push down the term store changes to the hidden lists (very much like the sync between the site collection user list and the UPA). Unfortunately it only pushes down changed items, so no luck here. Instead you actually need to go change it in the Term Store Management tool before running the timer job.
Warning: Under normal conditions you should never ever fiddle with the items in this hidden list. I'm just doing you this to show some stuff some of you never seen or even thought about.
What about the Note field then?
Let's take a look on what is stored in these two taxonomy fields. The TaxonomyField which is the lookup looks quite similar to a lookup column. It has the lookup id and the value:
The Note field (the hidden field) on the other hand contains just the term identifier and is the actual field used to store the connection to the term store. In case you copy, move or uploads a document to another Site Collection - then it will update the TaxonomyField with the correct lookup values.
I've seen the TaxCatchAll field, what's that!?
If you use managed metadata there is a hidden column on all your list items or documents called TaxCatchAll. This field contains all ID's in the hidden lookup list of all used terms and keywords for the list item object and is used by SharePoint when adding and updating items.
Who manages the hidden list?
Good question, it isn't you! The hidden list is automagically managed by two internal event receivers (can be found in the Microsoft.SharePoint.Taxonomy assembly). These event receivers are responsible for adding items to the hidden list and clean up old and unused ones. There's also a feature stapled, called TaxonomyFieldAdded, on the site definitions which is responsible for creating the hidden list as well as adding the item receivers.
This was it - a quick introduction on how to very clever use the SharePoint feature-set to make the tagging functionality available in SharePoint. And essentially it is just a plain ol' lookup columns with some event receivers that does all the magic for us!