<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>The blog of Wictor Wilén</title><link>http://www.wictorwilen.se:80/</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/WictorWilen" /><description>The blog of Wictor Wilén</description><language>en</language><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/WictorWilen" /><feedburner:info uri="wictorwilen" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>WictorWilen</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item><title>SharePoint 2013: Enabling PDF Previews in Document Libraries with Office Web Apps 2013</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/yrMU4SMDEbM/sharepoint-2013-enabling-pdf-previews-in-document-libraries-with-office-web-apps-2013</link><pubDate>Mon, 29 Apr 2013 00:42:00 PDT</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/sharepoint-2013-enabling-pdf-previews-in-document-libraries-with-office-web-apps-2013</guid><description>&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;A couple of weeks back I blogged about the &lt;a href="http://www.wictorwilen.se/office-web-apps-2013-patching-your-wac-farm-with-no-downtime"&gt;March Update for Office Web Apps 2013&lt;/a&gt; and also how you could use that update to &lt;a href="http://www.wictorwilen.se/sharepoint-2013-enabling-pdf-previews-with-office-web-apps-2013-march-2013-update"&gt;show PDF previews in a SharePoint 2013 Search Center&lt;/a&gt;. Since then I&amp;rsquo;ve received a lot of requests on how to enable PDF Previews in a Document Library, which isn&amp;rsquo;t there by default. Of course it is not a WAC thing, it&amp;rsquo;s a SharePoint 2013 thing &amp;ndash; but the SharePoint 2013 updates (up until now at least) does not provide this capability either.&lt;/p&gt;
&lt;p&gt;In this post I will show you that it can be done. It&amp;rsquo;s a JavaScript thing and can be done using a Content Editor Web Part added on all pages where you want the PDF previews or as Farm solution which uses a delegate control and a custom JavaScript file.&lt;/p&gt;
&lt;h2&gt;Build the PDF Preview solution&lt;/h2&gt;
&lt;p&gt;I assume that you are familiar with SharePoint 2013 development and knows what a delegate control is. What you need to do is create a new empty Farm solution project. In this project we&amp;rsquo;ll create a new web control that will add a JavaScript (which we will create in just a minute) to the page. The implementation should look like below:&lt;/p&gt;
&lt;pre class="brush: c-sharp; toolbar: false"&gt;[MdsCompliant(true)]
public class PdfPreviewControl: WebControl
{
    protected override void OnPreRender(EventArgs e)
    {
        ScriptLink.RegisterScriptAfterUI(this.Page, "wictor.pdfpreviews/previews.js", false);
    }
}&lt;/pre&gt;
&lt;p&gt;The JavaScript file, added as a Layouts file, is what makes the magic happen. We&amp;rsquo;re using the Script-On-Demand features in this script to make sure that the scripts aren&amp;rsquo;t executed before the SharePoint filepreview.js file is loaded. Once that file is loaded two new JavaScript objects are created; the &lt;em&gt;filePreviewManager&lt;/em&gt; and the &lt;em&gt;embeddedWACPreview&lt;/em&gt;. To enable the PDF previews we only need to add the PDF extension to these objects and specify the previewer objects and the dimensions. In this case I use the same settings as the other Word previewers.&lt;/p&gt;
&lt;pre class="brush: javascript; toolbar: false"&gt;function WictorsPdfPreviews() {
    SP.SOD.executeOrDelayUntilScriptLoaded(function () {
        filePreviewManager.previewers.extensionToPreviewerMap.pdf = 
            [embeddedWACPreview, WACImagePreview];
        embeddedWACPreview.dimensions.pdf= { width: 379, height: 252}
    }, "filepreview.js");
    notifyScriptsLoadedAndExecuteWaitingJobs("wictor.pdfpreviews/previews.js");
}
WictorsPdfPreviews();&lt;/pre&gt;
&lt;p&gt;Now we need to make sure that this control loads the JavaScript on all pages. This is done by adding a new Empty Element SPI and creating a &lt;em&gt;Control&lt;/em&gt; element pointing to the web control, like this:&lt;/p&gt;
&lt;pre class="brush: xhtml; toolbar: false"&gt;&amp;lt;Control 
  ControlAssembly="$SharePoint.Project.AssemblyFullName$" 
  ControlClass="Wictor.PdfPreviews.PdfPreviewControl" 
  Id="AdditionalPageHead" 
  Sequence="100"/&amp;gt;&lt;/pre&gt;
&lt;p&gt;As you can see we&amp;rsquo;re adding this control to the &lt;em&gt;AdditionalPageHead&lt;/em&gt;, which means that we will have it on every page. Do not forget to add the web control as a Safe Control in the project!&lt;/p&gt;
&lt;p&gt;The final thing we need to do is to modify the Feature that was automatically created when the Empty Element SPI was added to the project. You can scope it to whatever you like, but I want it for all Document Libraries in my farm so I set the scope to Farm. The image below shows all the files in the project.&lt;/p&gt;
&lt;p&gt;&lt;img width="283" height="280" title="The Visual Studio 2012 solution" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border: 0px;" alt="The Visual Studio 2012 solution" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Enabling-PDF-Previews-in_8155/SNAGHTML5441d3_3.png" border="0" /&gt;&lt;/p&gt;
&lt;h2&gt;Deploy and Test&lt;/h2&gt;
&lt;p&gt;Now all we have to do is to deploy the solution. Once the solution is deployed and the Farm feature activated we can navigate to any document library and upload a PDF file. Note that you have to be on at least the March 2013 update of Office Web Apps Server and that you have enabled the WordPDF application (see &lt;a href="http://www.wictorwilen.se/office-web-apps-2013-patching-your-wac-farm-with-no-downtime"&gt;previous blog post&lt;/a&gt;). Once you have the PDF file in the library you can click on the ellipsis button and see the PDF Preview:&lt;/p&gt;
&lt;p&gt;&lt;img width="707" height="508" title="PDF Previews in SharePoint 2013" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="PDF Previews in SharePoint 2013" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Enabling-PDF-Previews-in_8155/SNAGHTML4d9a26_1.png" border="0" /&gt;&lt;/p&gt;
&lt;h2&gt;Disclaimer&lt;/h2&gt;
&lt;p&gt;As always when it comes to stuff that is not documented. I do not give any guarantee that this will work on your machine(s) or after any upcoming SharePoint patches.&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;Enabling PDF Previews are not (yet) a default feature of SharePoint 2013 but can easily be added to your SharePoint farm &amp;ndash; if you&amp;rsquo;re allowed to use Full Trust solutions.&amp;nbsp; If you don&amp;rsquo;t feel like you want to do some hacking yourself you can download the &lt;a href="http://www.wictorwilen.se/Media/Default/files/Wictor.PdfPreviews.zip"&gt;WSP here&lt;/a&gt; and deploy it yourself to try it out.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=yrMU4SMDEbM:6frBCuJ_NrI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=yrMU4SMDEbM:6frBCuJ_NrI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=yrMU4SMDEbM:6frBCuJ_NrI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=yrMU4SMDEbM:6frBCuJ_NrI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=yrMU4SMDEbM:6frBCuJ_NrI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=yrMU4SMDEbM:6frBCuJ_NrI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=yrMU4SMDEbM:6frBCuJ_NrI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=yrMU4SMDEbM:6frBCuJ_NrI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/yrMU4SMDEbM" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/sharepoint-2013-enabling-pdf-previews-in-document-libraries-with-office-web-apps-2013</feedburner:origLink></item><item><title>Recertified as Microsoft Certified Solutions Master (MCSM) for SharePoint</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/MwEoiqMLh88/recertified-as-microsoft-certified-solutions-master-mcsm-for-sharepoint</link><pubDate>Wed, 17 Apr 2013 02:28:00 PDT</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/recertified-as-microsoft-certified-solutions-master-mcsm-for-sharepoint</guid><description>&lt;p&gt;Yesterday I got the really cool news that I completed all recertification requirements for the &lt;a href="http://www.microsoft.com" target="_blank"&gt;&lt;strong&gt;Microsoft&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; Certified Solutions Master: SharePoint certification&lt;/strong&gt;. Couldn’t be a happier SharePoint professional right now!&lt;/p&gt; &lt;p&gt;&lt;img title="MCSM: SharePoint" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="MCSM: SharePoint" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Recertified-as_9D6F/mcsm_3.jpg" width="453" height="162"&gt;&lt;/p&gt; &lt;h2&gt;What is the MCSM and what about MCM?&lt;/h2&gt; &lt;p&gt;The Microsoft Certified Master (MCM) program has during the latest year transitioned into the Microsoft Certified Solutions Master (MCSM) program. It is not only a change in name but also a change made to adapt to the new world order. The program is not longer focusing on one specific version of the product but instead focus on what’s in the market at the current moment and specifically it covers both on-premise and cloud solutions. This is good in many senses – this allows the program to always be current, always use the latest techniques and technologies etc. The MCM was a certification without expiration date (well eventually the product cease to exist, but you still have the cert) whereas the MCSM has a three year life span and you must recertify to stay on top.&lt;/p&gt; &lt;h2&gt;The first MCSM : SharePoint rotation!&lt;/h2&gt; &lt;p&gt;I was fortunate to be able to participate in the rotation called U3, or Upgrade 3, which was the first MCSM rotation for SharePoint. It was two weeks on site, in the always sunny and warm Seattle, in January. I had the opportunity to spend these two weeks in a class room with the finest SharePoint professionals there is. We had great instructors, awesome labs, and fantastic discussions over the two weeks duration. It all led up to one written exam, called the Knowledge Exam, and one hands on lab, called the Qualification Lab. As always the QL was basically doing a couple of weeks worth of deep dive SharePoint work in about 8 hours time. Taken into account that this was a beta it was just about the hardest work I’ve ever done – but it was pure fun. And I made it! Phew…&lt;/p&gt; &lt;p&gt;Congrats to all my other friends that made it through this rotation and best of luck to the ones who will have the joy of doing the exams one more time! You can do it!&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=MwEoiqMLh88:21AIY8LCoe8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=MwEoiqMLh88:21AIY8LCoe8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=MwEoiqMLh88:21AIY8LCoe8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=MwEoiqMLh88:21AIY8LCoe8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=MwEoiqMLh88:21AIY8LCoe8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=MwEoiqMLh88:21AIY8LCoe8:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=MwEoiqMLh88:21AIY8LCoe8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=MwEoiqMLh88:21AIY8LCoe8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/MwEoiqMLh88" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/recertified-as-microsoft-certified-solutions-master-mcsm-for-sharepoint</feedburner:origLink></item><item><title>Introducing Open WOPI - an open WOPI Client for SharePoint, Exchange and Lync</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/mxKfMg_HWHQ/introducing-open-wopi---an-open-wopi-client-for-sharepoint-exchange-and-lync</link><pubDate>Mon, 15 Apr 2013 10:50:14 PDT</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/introducing-open-wopi---an-open-wopi-client-for-sharepoint-exchange-and-lync</guid><description>&lt;p&gt;Today at the SharePoint Evolutions 2013 Conference I announced my latest pet project called &lt;strong&gt;Open WOPI&lt;/strong&gt;. Open WOPI is an open WOPI client that allows you to extend SharePoint 2013, Exchange 2013 and Lync 2013 with file previews and editors for any type of file formats. &lt;/p&gt; &lt;p&gt;&lt;img title="Open WOPI" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Open WOPI" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Introducing-Open-WOPI---an-open-WOPI-Cli_9DEB/highres_3.png" width="300" height="98"&gt;&lt;/p&gt; &lt;p&gt;The project is now (at least very, very soon) available to download from &lt;a href="http://openwopi.codeplex.com/"&gt;openwopi.codeplex&lt;/a&gt;.com and is published under the Ms-PL license. This is currently an early beta (or what you would like to call it) but will be improved over time.&lt;/p&gt; &lt;h3&gt;&lt;/h3&gt; &lt;h3&gt;&lt;/h3&gt; &lt;h3&gt;Standards&lt;/h3&gt; &lt;p&gt;Open WOPI is based on the &lt;a href="http://askwictor.com/WOPI"&gt;[MS-WOP]&lt;/a&gt; protocol, published by &lt;a href="http://www.microsoft.com" target="_blank"&gt;Microsoft&lt;/a&gt;, and used by Office Web Apps Server 2013, SharePoint 2013, Exchange 2013 and Lync 2013. &lt;/p&gt; &lt;h3&gt;File format support&lt;/h3&gt; &lt;p&gt;Currently Open WOPI has support for the following formats:&lt;/p&gt; &lt;ul&gt; &lt;ul&gt; &lt;li&gt;GPX - Uses Bing maps  &lt;li&gt;TXT - Viewing and editing  &lt;li&gt;VSDX - Thumbnail viewing &lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;p&gt;More formats are in the works…&lt;/p&gt; &lt;h3&gt;&lt;/h3&gt; &lt;h3&gt;Documentation&lt;/h3&gt; &lt;p&gt;Not much yet, but I’ll try to add that over the next few weeks. &lt;/p&gt; &lt;h3&gt;&lt;/h3&gt; &lt;h3&gt;More information&lt;/h3&gt; &lt;p&gt;For more information, &lt;a href="https://openwopi.codeplex.com/discussions"&gt;feedback and ideas&lt;/a&gt; about the project please refer to the Codeplex site: &lt;a href="http://openwopi.codeplex.com/"&gt;openwopi.codeplex.com&lt;/a&gt;. I’d like to hear what file formats you would like Open WOPI to support.&lt;/p&gt; &lt;p&gt;The slides from the presentation at the SharePoint Evolutions conference and links can be found &lt;a href="http://www.wictorwilen.se/Conferences/SPEvo/DEV205"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;h3&gt;&lt;/h3&gt; &lt;h3&gt;Contributors&lt;/h3&gt; &lt;p&gt;Thanks to Sam Dolan, aka &lt;a href="https://twitter.com/pinkpetrol"&gt;Pinkpetrol&lt;/a&gt;, for the really cool logo for Open WOPI.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=mxKfMg_HWHQ:Ffzd_4WTpb8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=mxKfMg_HWHQ:Ffzd_4WTpb8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=mxKfMg_HWHQ:Ffzd_4WTpb8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=mxKfMg_HWHQ:Ffzd_4WTpb8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=mxKfMg_HWHQ:Ffzd_4WTpb8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=mxKfMg_HWHQ:Ffzd_4WTpb8:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=mxKfMg_HWHQ:Ffzd_4WTpb8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=mxKfMg_HWHQ:Ffzd_4WTpb8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/mxKfMg_HWHQ" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/introducing-open-wopi---an-open-wopi-client-for-sharepoint-exchange-and-lync</feedburner:origLink></item><item><title>SharePoint 2013: Enabling cross domain profile pictures</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/emKlrbcKKgQ/sharepoint-2013-enabling-cross-domain-profile-pictures</link><pubDate>Tue, 09 Apr 2013 02:07:00 PDT</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/sharepoint-2013-enabling-cross-domain-profile-pictures</guid><description>&lt;p&gt;Just discovered a really interesting and just awesome nugget in SharePoint 2013 that solves a problem that have been annoying me for a long time. The problem manifests itself when you’re having multiple URL’s for your SharePoint farm or when using SAML or Forms based login (like in Office 365 and SharePoint Online) and you’re using the profile pictures on sites not residing on the My Site Host Web Application (or host named site collection). Then the user profile picture is not shown, you get the default &lt;em&gt;image not found&lt;/em&gt; image or you’re prompted to authenticate with the My Site Host.&lt;/p&gt; &lt;p&gt;Let’s take an example. Assume I have one site at intranet.contoso.com and the My Site host exists on mysite.contoso.com. I have not configured any Internet Explorer zones or anything and I’m promted to log in at each location. This is how the Newsfeed Web Part will look like on intranet.contoso.com, if I cancel out the authentication prompt or if I’m using some forms based login:&lt;br&gt;&lt;img title="No picture..." style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="No picture..." src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013_97E2/SNAGHTML360dc4_1.png" width="450" height="194"&gt;&lt;/p&gt; &lt;p&gt;You see, no fancy picture of Mr administrator! There’s a couple of ways to solve this using IE Zones, anonymous access etc, but none are perfect and comes with consequences.&lt;/p&gt; &lt;p&gt;So how can I get the picture to be shown without messing with security, cross domain issues etc. Fortunately I guess I was not the only one that was annoyed by this (most likely everyone using Office 365 as well) so the SharePoint team has added a new feature to SharePoint that allows us to show profile pictures cross-domain.&lt;/p&gt; &lt;p&gt;It’s a very simple operation and just requires some basic PowerShell skills. Basically all you need to do is to set the &lt;strong&gt;CrossDomainPhotosEnabled&lt;/strong&gt; property on the SPWebApplication object to true, like this:&lt;/p&gt;&lt;pre class="brush: powershell; toolbar: false"&gt;asnp Microsoft.SharePoint.PowerShell
$wa = Get-SPWebApplication http://intranet.contoso.com
$wa.CrossDomainPhotosEnabled = $true
$wa.Update()&lt;/pre&gt;
&lt;p&gt;Now the Newsfeed, in the sample above, will look like below. And I was not prompted for any authentication or anything! Isn’t that sweet! And it works very well on Host Named Site Collections as well.&lt;/p&gt;
&lt;p&gt;&lt;img title="Look at that guy!" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="Look at that guy!" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013_97E2/SNAGHTML3f825c_1.png" width="455" height="182"&gt;&lt;/p&gt;
&lt;p&gt;Basically what happens behind the scenes is that the request for the user picture is sent via a “proxy” .aspx page called &lt;strong&gt;userphoto.aspx &lt;/strong&gt;which takes a couple of parameters; URL of the picture, the account name (or e-mail) as well as the picture size (S, M or L). This page will return a JPEG stream of the user profile picture without crossing any domains on the client side.&lt;/p&gt;
&lt;p&gt;I hope this little nugget will save you and your customers a lot of time and annoyance..&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=emKlrbcKKgQ:cgtQQHl0Z6U:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=emKlrbcKKgQ:cgtQQHl0Z6U:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=emKlrbcKKgQ:cgtQQHl0Z6U:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=emKlrbcKKgQ:cgtQQHl0Z6U:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=emKlrbcKKgQ:cgtQQHl0Z6U:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=emKlrbcKKgQ:cgtQQHl0Z6U:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=emKlrbcKKgQ:cgtQQHl0Z6U:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=emKlrbcKKgQ:cgtQQHl0Z6U:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/emKlrbcKKgQ" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/sharepoint-2013-enabling-cross-domain-profile-pictures</feedburner:origLink></item><item><title>SharePoint 2010 Web Parts in Action as the Manning Deal of the Day</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/LkqREI5etDI/sharepoint-2010-web-parts-in-action-as-the-manning-deal-of-the-day</link><pubDate>Thu, 04 Apr 2013 22:58:00 PDT</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/sharepoint-2010-web-parts-in-action-as-the-manning-deal-of-the-day</guid><description>&lt;p&gt;&lt;img title="SharePoint 2010 Web Parts in Action" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="SharePoint 2010 Web Parts in Action" align="right" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/be2522237dbd_6EE8/image_3.png" width="149" height="187"&gt;If you still haven’t picked up on my book about SharePoint Web Parts – &lt;strong&gt;&lt;a href="http://www.manning.com/wilen/"&gt;SharePoint 2010 Web Parts in Action&lt;/a&gt;&lt;/strong&gt;, then this is the chance for you. Today (5th of April) the book is featured as the Manning Deal of the Day. All you have to do is browse to &lt;a title="http://www.manning.com/wilen/" href="http://www.manning.com/wilen/"&gt;http://www.manning.com/wilen/&lt;/a&gt; and then use the &lt;strong&gt;dotd0405au&lt;/strong&gt; promotion code. This will give you &lt;strong&gt;50% percent discount&lt;/strong&gt;, for you non-math-geniuses that’s half off the full price! And since you now saved a couple of bucks, there’s another Manning book with the same deal and promotion code today and that’s &lt;a href="http://www.manning.com/payette2/"&gt;PowerShell in Action 2nd edition&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;PS: Even though the name of the book implies SharePoint 2010, it’s fully applicable to SharePoint 2013 – very little has changed in the Web Parts space.&lt;/p&gt; &lt;p&gt;Well, what are you waiting for, go get it…&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=LkqREI5etDI:bTtZHr7HaIg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=LkqREI5etDI:bTtZHr7HaIg:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=LkqREI5etDI:bTtZHr7HaIg:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=LkqREI5etDI:bTtZHr7HaIg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=LkqREI5etDI:bTtZHr7HaIg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=LkqREI5etDI:bTtZHr7HaIg:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=LkqREI5etDI:bTtZHr7HaIg:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=LkqREI5etDI:bTtZHr7HaIg:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/LkqREI5etDI" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/sharepoint-2010-web-parts-in-action-as-the-manning-deal-of-the-day</feedburner:origLink></item><item><title>Speaking at SharePoint Evolutions Conference 2013</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/Lu5gd-DPlOM/speaking-at-sharepoint-evolutions-conference-2013</link><pubDate>Thu, 04 Apr 2013 00:04:00 PDT</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/speaking-at-sharepoint-evolutions-conference-2013</guid><description>&lt;p&gt;In less than two weeks I’m speaking at the &lt;a href="http://www.sharepointevolutionconference.com/" target="_blank"&gt;SharePoint Evolutions Conference 2013&lt;/a&gt; in London. It is as exciting for me as it is for all attendees. The conferences held by &lt;a href="http://www.combined-knowledge.com/" target="_blank"&gt;Combined Knowledge&lt;/a&gt; has proven over the last years to be the highlight of SharePoint conferences around the world – everything from the venue, to the people, to the sessions and to the parties are surgically planned and executed – no one leaves without a smile on their face and pumped with knowledge! &lt;/p&gt; &lt;p&gt;As a speaker being selected for this conference is the by far the proudest moment of any SharePoint professional and I’m so glad that I’m back for another year, hanging around with the best of the best, and not only speaker wise – the speakers at the Evolutions conference are the people that knows the product inside out and work with the product in real projects.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.sharepointevolutionconference.com/"&gt;&lt;img title="Speaker_Evo-2013-Banner" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="Speaker_Evo-2013-Banner" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Speaking-at-SharePoint-Evolutions-Confer_7D48/Speaker_Evo-2013-Banner_3.png" width="600" height="79"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;This year I’m having one session called &lt;strong&gt;Extending SharePoint, Exchange and Lync 2013 with a custom WOPI Client&lt;/strong&gt;. I will walk you through the WOPI protocol, which is what Office Web Apps Server 2013 (WAC) is built upon, and show you how to make your own WOPI client for custom file formats, for viewing, editing, previews etc. This will be an interesting session and show you a really interesting “partner opportunity”. I’ve prepared a good set of demos, so be there!&lt;/p&gt; &lt;p&gt;Looking forward to seeing old and new faces at this conference. If you haven’t registered yet – &lt;a href="http://www.sharepointevolutionconference.com/register.html"&gt;there’s still a chance for you to get your very own ticket&lt;/a&gt;.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=Lu5gd-DPlOM:k1VUGFlk-ts:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=Lu5gd-DPlOM:k1VUGFlk-ts:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=Lu5gd-DPlOM:k1VUGFlk-ts:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=Lu5gd-DPlOM:k1VUGFlk-ts:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=Lu5gd-DPlOM:k1VUGFlk-ts:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=Lu5gd-DPlOM:k1VUGFlk-ts:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=Lu5gd-DPlOM:k1VUGFlk-ts:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=Lu5gd-DPlOM:k1VUGFlk-ts:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/Lu5gd-DPlOM" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/speaking-at-sharepoint-evolutions-conference-2013</feedburner:origLink></item><item><title>Renewed as SharePoint Most Valuable Professional (MVP) for 2013</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/YGc0Sr_u-r0/renewed-as-sharepoint-most-valuable-professional-mvp-for-2013</link><pubDate>Mon, 01 Apr 2013 07:56:00 PDT</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/renewed-as-sharepoint-most-valuable-professional-mvp-for-2013</guid><description>&lt;p&gt;I just received the confirmation that I am renewed as SharePoint MVP (&lt;a href="http://www.microsoft.com" target="_blank"&gt;Microsoft&lt;/a&gt; Most Valuable Professional) for my fourth consecutive year. It’s an honor being chosen among all the professionals around the world, especially now when SharePoint is getting more and more widespread and is being adopted by more and more companies worldwide.&lt;/p&gt; &lt;p&gt;&lt;img title="Microsoft MVP" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="Microsoft MVP" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Renewed-as-SharePoint-Most-Valuable-Prof_ED8A/image_3.png" width="650" height="125"&gt;&lt;/p&gt; &lt;p&gt;I’d like to take the opportunity to say thanks all my colleagues at &lt;a href="http://www.connecta.se" target="_blank"&gt;Connecta&lt;/a&gt;, that put up with me, and all my friends around the world that I’ve learnt to know throughout these years. I’ll continue to write obscure blog posts and show up at conferences, and I will continue to organize the Swedish SharePoint User Group meetings.&lt;/p&gt; &lt;p&gt;Thank you all for the support!&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=YGc0Sr_u-r0:7aMS7v7kl3M:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=YGc0Sr_u-r0:7aMS7v7kl3M:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=YGc0Sr_u-r0:7aMS7v7kl3M:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=YGc0Sr_u-r0:7aMS7v7kl3M:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=YGc0Sr_u-r0:7aMS7v7kl3M:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=YGc0Sr_u-r0:7aMS7v7kl3M:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=YGc0Sr_u-r0:7aMS7v7kl3M:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=YGc0Sr_u-r0:7aMS7v7kl3M:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/YGc0Sr_u-r0" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/renewed-as-sharepoint-most-valuable-professional-mvp-for-2013</feedburner:origLink></item><item><title>SharePoint 2013 Managed Metadata field and CSOM issues in 2010-mode sites</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/L9TVKkooN0E/sharepoint-2013-managed-metadata-field-and-csom-issues-in-2010-mode-sites</link><pubDate>Wed, 27 Mar 2013 17:01:00 PDT</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/sharepoint-2013-managed-metadata-field-and-csom-issues-in-2010-mode-sites</guid><description>&lt;h2&gt;Introduction&lt;/h2&gt; &lt;p&gt;SharePoint 2013 introduces a new model on how Site Collections are upgraded using the new Deferred Site Collection Upgrade. To keep it simple it means that SharePoint 2013 can run a Site Collection in either 2010 mode or 2013 mode, and SharePoint 2013 contains a lot of the SharePoint 2010 artifacts (JS files, Features, Site Definitions) to handle this. When you’re doing a content database attach to upgrade from 2010 to 2013, only the database schema is upgraded and not the actual sites (by default). The actual Site Collection upgrade is done by the Site Collection administrator when they feel that they are ready to do that and have verified the functionality of SharePoint 2013 (or you force them to upgrade anyways). But, the Site Collection admin might have to upgrade sooner than expected for some sites.&lt;/p&gt; &lt;h2&gt;Upgrade troubles&lt;/h2&gt; &lt;p&gt;This post is all about what has happened to us when our Office 365 SharePoint Online (SPO) tenant had been upgraded (and right now the Site Collection upgrade is disabled for us so we can’t do anything about it). The limitations of customizations in the 2010 version of SPO was very limited (to be kind) and we embraced JavaScript (which people have despised for a decade and now suddenly think is manna from heaven). We also leveraged Managed Metadata in a lot of lists, libraries and sites. We’ve built Web Parts using JavaScript CSOM to render information and also .NET CSOM stuff running in Windows Azure doing background work. Once our tenant was upgraded to 2013 all of the customizations using Managed Metadata stopped to work…&lt;/p&gt; &lt;h2&gt;JSOM sample with Managed Metadata&lt;/h2&gt; &lt;p&gt;I will show you one example of what works in SharePoint 2010 and what does not work in SharePoint 2013 when you’re site is running in 2010 compatibility mode.&lt;/p&gt; &lt;p&gt;Assume we have a simple list with two columns; Title and Color, where Color is a Managed Metadata Field. To render this list using JSOM we could use code like this in a Web Part or Content Editor or whatever.&lt;/p&gt;&lt;pre class="brush: javascript; toolbar: false"&gt;var products;
function loadProducts() {
	document.getElementById('area').innerHTML = 'Loading...';
	var context = new SP.ClientContext.get_current();
	var web = context.get_web();
	var list = web.get_lists().getByTitle('TestList');
	products = list.getItems('');
	context.load(products, 'Include (Title, Color)');
	
	context.executeQueryAsync(function() {
		var collection = products.getEnumerator();
		var html = '&amp;lt;table&amp;gt;'
		while(collection.moveNext()) {
			var product = collection.get_current();
			html +='&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;'
			html += product.get_item('Title');
			html += '&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'
			html += product.get_item('Color').split('|')[0];
			html += '&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'			
		}
		html += '&amp;lt;/table&amp;gt;'
		document.getElementById('area').innerHTML = html;
	}, function() {
		document.getElementById('area').innerHTML = 'An error occurred';
	});
}
ExecuteOrDelayUntilScriptLoaded(loadProducts, 'sp.js');&lt;/pre&gt;
&lt;p&gt;As you can see a very simple approach. We’re reading all the items from the list and rendering them as a table, and this html table is finally inserted into a div (with id = &lt;em&gt;area&lt;/em&gt; in the example above). This should look something like this when rendered:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Issues-with-Managed-Metadata-fields-and-_14B03/image_2.png"&gt;&lt;img title="JSOM Rendering in SharePoint 2010" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="JSOM Rendering in SharePoint 2010" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Issues-with-Managed-Metadata-fields-and-_14B03/image_thumb.png" width="162" height="90"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The key here is that Managed Metadata in 2010 JSOM is returned as a string object (2010 .NET CSOM does that as well). This string object is a concatenation of the Term, the pipe character (|) and the term id. So in the code sample above I just split on the pipe character and take the first part. There was no other decent way to do this in SharePoint 2010 and I’ve seen a lot of similar approaches.&lt;/p&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;h2&gt;Same code running in SharePoint 2013 on a SharePoint 2010 mode site&lt;/h2&gt;
&lt;p&gt;If we now take this site collection and move it to SharePoint 2013 or recreate the solution on a 2010 mode site in SharePoint 2013. Then we run the same script, then this is what we’ll see, something goes wrong…&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Issues-with-Managed-Metadata-fields-and-_14B03/image_4.png"&gt;&lt;img title="Failed JSOM Rendering" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Failed JSOM Rendering" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Issues-with-Managed-Metadata-fields-and-_14B03/image_thumb_1.png" width="145" height="71"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You might also see a JavaScript error, depending on your web browser configuration. Of course proper error handling could show something even more meaningful!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Issues-with-Managed-Metadata-fields-and-_14B03/image_6.png"&gt;&lt;img title="JSOM Runtime exception" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="JSOM Runtime exception" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Issues-with-Managed-Metadata-fields-and-_14B03/image_thumb_2.png" width="604" height="91"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Something is not working here anymore!&lt;/p&gt;
&lt;p&gt;What really happens is that the CSOM client service do not return a string object for Managed Metadata but instead a properly typed &lt;em&gt;TaxonomyFieldValue&lt;/em&gt;. But that type (SP.Taxonomy.TaxonomyFieldValue) does not exist in the 2010 JSOM. Remember I said that SharePoint 2013 uses the old 2010 JavaScripts when running in 2010 compatibility mode. Unfortunately there is no workaround, unless we roll our own SP.Taxonomy.TaxonomyFieldValue class (but that’s for another JS whizkid to fix, just a quick tip to save you the trouble – you cannot just add the 2013 SP.Taxonomy,js to your solution).&lt;/p&gt;
&lt;h3&gt;So why is this so then?&lt;/h3&gt;
&lt;p&gt;If we take a closer look at what is transferred over the wire we can see that when running on SharePoint 2010 the managed metadata is transferred as strings:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Issues-with-Managed-Metadata-fields-and-_14B03/image_8.png"&gt;&lt;img title="Fiddler trace on SharePoint 2010" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Fiddler trace on SharePoint 2010" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Issues-with-Managed-Metadata-fields-and-_14B03/image_thumb_3.png" width="604" height="72"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But on SharePoint 2013 it is typed as a TaxonomyFieldValue object:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Issues-with-Managed-Metadata-fields-and-_14B03/image_10.png"&gt;&lt;img title="Fiddler trace on SharePoint 2013" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Fiddler trace on SharePoint 2013" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Issues-with-Managed-Metadata-fields-and-_14B03/image_thumb_4.png" width="604" height="76"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It’s a bit of a shame, since the server is actually aware of that we’re running the 2010 (14) mode client components! (SchemaVersion is what we sent from the CSOM and LibraryVersion is the library used on the server side)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Issues-with-Managed-Metadata-fields-and-_14B03/SNAGHTML712ef9.png"&gt;&lt;img title="Fiddler trace on SharePoint 2013" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Fiddler trace on SharePoint 2013" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Issues-with-Managed-Metadata-fields-and-_14B03/SNAGHTML712ef9_thumb.png" width="600" height="82"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I do really hope that the SharePoint team think about this for future releases – respect the actual schema used/sent by the Client Object Model!&lt;/p&gt;
&lt;blockquote&gt;Of course, this JavaScript solution will not work as-is when upgrading the Site Collection to 2013 mode. That is expected and that’s what the Evaluation sites are for.&lt;/blockquote&gt;
&lt;h2&gt;What about .NET CSOM?&lt;/h2&gt;
&lt;p&gt;We have a similar issue in .NET CSOM, even though we don’t get a SharePoint CSOM runtime exception. Instead of returning a string object you will get back a Dictionary with Objects as values – but if you’re code is expecting a string you still get the exception. So in 99% of the cases it will fail here as well.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Issues-with-Managed-Metadata-fields-and-_14B03/SNAGHTML778cac.png"&gt;&lt;img title="Nothing exciting here, move along..." style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Nothing exciting here, move along..." src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Issues-with-Managed-Metadata-fields-and-_14B03/SNAGHTML778cac_thumb.png" width="600" height="159"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;Deferred Site Collection update might be a good idea and you might think that your customizations will work pretty well even after an upgrade to SharePoint 2013, just as long as you don’t update your actual Site Collections to 2013. But you’ve just seen that this is not the case.&lt;/p&gt;
&lt;p&gt;Happy easter!&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=L9TVKkooN0E:KT0wJQ4Cz28:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=L9TVKkooN0E:KT0wJQ4Cz28:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=L9TVKkooN0E:KT0wJQ4Cz28:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=L9TVKkooN0E:KT0wJQ4Cz28:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=L9TVKkooN0E:KT0wJQ4Cz28:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=L9TVKkooN0E:KT0wJQ4Cz28:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=L9TVKkooN0E:KT0wJQ4Cz28:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=L9TVKkooN0E:KT0wJQ4Cz28:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/L9TVKkooN0E" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/sharepoint-2013-managed-metadata-field-and-csom-issues-in-2010-mode-sites</feedburner:origLink></item><item><title>SharePoint 2013: Enabling PDF Previews with Office Web Apps 2013 March 2013 update</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/v8zbhFiJO6E/sharepoint-2013-enabling-pdf-previews-with-office-web-apps-2013-march-2013-update</link><pubDate>Wed, 13 Mar 2013 08:06:00 PDT</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/sharepoint-2013-enabling-pdf-previews-with-office-web-apps-2013-march-2013-update</guid><description>&lt;p&gt;In my &lt;a href="http://www.wictorwilen.se/office-web-apps-2013-patching-your-wac-farm-with-no-downtime" target="_blank"&gt;last post (still smoking fresh)&lt;/a&gt; I showed you how to update your Office Web Apps 2013 farm to the March 2013 update, connect it to SharePoint 2013 and being able to view PDF documents in the browser. What I didn’t explain or show in that post was how to enable the PDF Previews in Search – but I’ll do it now.&lt;/p&gt; &lt;h2&gt;Pre-requisites&lt;/h2&gt; &lt;p&gt;Before you start fiddling with this, you need to make sure that you have the March 2013 update of Office Web Apps Server 2013 (WAC) installed and connected to your farm – if you don’t know for sure, ask your admins – sometimes they know…if they don’t give them the link to &lt;a href="http://www.wictorwilen.se/office-web-apps-2013-patching-your-wac-farm-with-no-downtime" target="_blank"&gt;my previous blog post&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Note: You don’t have to have a patched SharePoint 2013, this will work on the RTM bits.&lt;/p&gt; &lt;h2&gt;&lt;/h2&gt; &lt;h2&gt;Default PDF Search Experience&lt;/h2&gt; &lt;p&gt;SharePoint 2013 natively supports crawling PDF documents, through the new document parsers. That is you don’t have to fiddle with any custom PDF IFilters etc. The native PDF document parser is a good enough solution, but have some room for improvements.&lt;/p&gt; &lt;p&gt;The Search Experience and display in SharePoint 2013 is based upon Display Templates. Display Templates decide how the result should be shown and how the fly-out of the result should look like. For Office documents, when SharePoint 2013 is connected to a WAC farm, SharePoint displays inline previews which you can use to skim through the results really quick. For PDF this is not the case – not even if you use a WAC farm with the March 2013 update (even though the WOPI binding supports the &lt;em&gt;interactivepreview &lt;/em&gt;action). This is a sample on how a PDF document could look like in SharePoint 2013 Search:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Enabling-PDF-Previews-wi_D6AE/SNAGHTML34ad179.png"&gt;&lt;img title="Default PDF Search Experience" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="Default PDF Search Experience" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Enabling-PDF-Previews-wi_D6AE/SNAGHTML34ad179_thumb.png" width="600" height="189"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt;&lt;/h2&gt; &lt;h2&gt;Enabling PDF Previews in the Search Result&lt;/h2&gt; &lt;p&gt;Since we have the opportunity to modify the Display Templates and create our own Search Experience we can very easy modify the fly-out/hover panel of the PDF results to show the interactive preview. We can do this in two different ways…&lt;/p&gt; &lt;h3&gt;Create a new Result Type&lt;/h3&gt; &lt;p&gt;The easiest and fastest approach to enable our previews for PDF documents is by creating a custom Result Type. This is done by going to Site Settings &amp;gt; (Search) Result Types and then finding the PDF Result Type. Choose to Copy the Word Result Type. This will create a new Result Type.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Enabling-PDF-Previews-wi_D6AE/SNAGHTML352530b.png"&gt;&lt;img title="Copy the Result Type" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="Copy the Result Type" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Enabling-PDF-Previews-wi_D6AE/SNAGHTML352530b_thumb.png" width="398" height="154"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Give the new Result Type an appropriate name, “PDF with Preview” for instance. Then scroll down to Actions and in the “What should these results look like?” drop-down, choose to use the Word Display Template.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Enabling-PDF-Previews-wi_D6AE/SNAGHTML353fa43.png"&gt;&lt;img title="Word or PDF?" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="Word or PDF?" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Enabling-PDF-Previews-wi_D6AE/SNAGHTML353fa43_thumb.png" width="326" height="144"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Then just click Save, go back to your Search Center and search for a PDF document and voilá – we have PDF Previews.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Enabling-PDF-Previews-wi_D6AE/SNAGHTML3560574.png"&gt;&lt;img title="PDF Previews in da house!" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="PDF Previews in da house!" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Enabling-PDF-Previews-wi_D6AE/SNAGHTML3560574_thumb.png" width="600" height="321"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;Modifying the PDF Display Templates&lt;/h3&gt; &lt;p&gt;The second approach, which is a bit more advanced is to actually modify the PDF Flyout Design Template. You do this by going to Site Settings &amp;gt; Design Manager then choose &lt;em&gt;5. Edit Display Templates&lt;/em&gt;. Locate the PDF Flyout item by filtering on the &lt;em&gt;Target Control Type&lt;/em&gt; column and use &lt;em&gt;SearchHoverPanel&lt;/em&gt;, then scroll down to &lt;em&gt;PDF Hover Panel&lt;/em&gt;. To modify the PDF Hover Panel, use the Word Hover Panel as a template. I’m not going in to all the details on how to modify the actual HTML file (see my similar post on how to achieve this &lt;a href="http://www.wictorwilen.se/sharepoint-2013-building-your-own-wopi-client-part-4-now-search-enabled" target="_blank"&gt;here&lt;/a&gt;). But once you’ve modified it, make sure to save it to the gallery so the JS file is generated, and publish it. Now (if you made the correct updates) you will have Custom Search Previews for PDF documents.&lt;/p&gt; &lt;h2&gt;Summary&lt;/h2&gt; &lt;p&gt;You’ve now seen how you quick and easy can enable PDF Search Previews in SharePoint 2013 using the March 2013 update for Office Web Apps 2013. All you need to do is either create a custom Result Type and use the Word Display Templates or modify the default PDF Display Template. I really hope that &lt;a href="http://www.microsoft.com" target="_blank"&gt;Microsoft&lt;/a&gt; makes this a standard feature for upcoming SharePoint 2013 releases.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=v8zbhFiJO6E:4TTkrJnMi58:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=v8zbhFiJO6E:4TTkrJnMi58:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=v8zbhFiJO6E:4TTkrJnMi58:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=v8zbhFiJO6E:4TTkrJnMi58:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=v8zbhFiJO6E:4TTkrJnMi58:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=v8zbhFiJO6E:4TTkrJnMi58:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=v8zbhFiJO6E:4TTkrJnMi58:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=v8zbhFiJO6E:4TTkrJnMi58:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/v8zbhFiJO6E" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/sharepoint-2013-enabling-pdf-previews-with-office-web-apps-2013-march-2013-update</feedburner:origLink></item><item><title>Office Web Apps 2013: Patching your WAC farm with no downtime</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/yX3raqFsryw/office-web-apps-2013-patching-your-wac-farm-with-no-downtime</link><pubDate>Wed, 13 Mar 2013 03:03:00 PDT</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/office-web-apps-2013-patching-your-wac-farm-with-no-downtime</guid><description>&lt;p&gt;I’m really glad to see some patches being rolled out for Office 2013, SharePoint 2013 and Office Web Apps 2013. There’s some really important fixes and some very interesting fixes that I’ve been waiting for. In this post we’ll take a look at the first Office Web Apps 2013 (WAC) update – specifically we’re looking at how to patch your WAC farm to minimize the downtime. If you follow my instructions you will have zero downtime (except for a brief moment where Excel stuff will not be accessible).&lt;/p&gt; &lt;h2&gt;Background and preparations&lt;/h2&gt; &lt;p&gt;&lt;img title="RTM WACs" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="RTM WACs" align="right" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013-Patching-your-WAC-f_8BAA/image_19.png" width="131" height="240"&gt;For this sample I will have a SharePoint 2013 (RTM) farm connected to a WAC 2013 (RTM) farm. The WAC farm is load balanced using NLB, like illustrated on the right. &lt;/p&gt; &lt;p&gt;On order to update our WAC farm we need to download the March 2013 patch for Office Web Apps 2013. You can find it at &lt;a href="http://www.microsoft.com" target="_blank"&gt;Microsoft&lt;/a&gt; Download center and it is called “&lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=36981" target="_blank"&gt;Update for Microsoft Office Web Apps Server 2013 (KB2760445)&lt;/a&gt;”. The KB article does not reveal much of what has changed, but if you take a look at an earlier patch &lt;a href="http://support.microsoft.com/kb/2760486" target="_blank"&gt;KB2760486&lt;/a&gt; (March 5th) you’ll notice some really cool things. If you don’t have time to read it – I’ll show you some of them at the end of this post. Ok, you do not have to install KB2760486, you only need the KB2760445 one.&lt;/p&gt; &lt;h2&gt;Patching the first WAC Server&lt;/h2&gt; &lt;p&gt;After downloading the patch and copying it to our WAC machines we can start the patching process. We would like to do this without the users even noticing it. First of all we need to take one of the servers out of rotation in the WAC farm. You do this using the load balancer. In my case I’m using Microsoft NLB and using PowerShell this is an easy task. Next thing to do is just remove the WAC server from the WAC farm – that is also a one-line PowerShell command. WAC Servers should only be patched with the binaries installed, not when they are participating in a WAC farm.&lt;/p&gt; &lt;p&gt;These two lines does the trick:&lt;/p&gt;&lt;pre class="brush: powershell; toolbar: false"&gt;Get-NlbClusterNode -NodeName $env:COMPUTERNAME | Stop-NlbClusterNode -Drain
Remove-OfficeWebAppsMachine
&lt;/pre&gt;
&lt;blockquote&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: You MUST remove the machines from the old farm before patching and then later create a new WAC farm (follow the instructions thoroughly). You cannot patch a running WAC Farm!&lt;/font&gt;&lt;/blockquote&gt;
&lt;p&gt;Once this is done the server is no longer receiving requests and it’s no longer a part of the WAC farm and we can start patching this machine. All our end-user requests are now going to the remaining server(s) in the WAC farm.&lt;/p&gt;
&lt;p&gt;&lt;img title="One RTM and one patching going on..." style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="One RTM and one patching going on..." src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013-Patching-your-WAC-f_8BAA/image_20.png" width="133" height="240"&gt;&lt;/p&gt;
&lt;p&gt;To patch the machine start the downloaded .exe file (wacserver2013-kb2760445-fullfile-x64-glb.exe) and just follow the instructions; accept license agreement etc. You will be asked to close any PowerShell (IDE) windows that has the Office Web Apps module loaded and you might get asked to reboot once the update is finished (there’s of course no harm in doing it anyways). &lt;/p&gt;
&lt;p&gt;When the patching is done (and you rebooted) we need to create a new WAC farm, on the patched server. You do this using the same way as you did for the RTM version. Use the same server name as your old farm, same settings and the same certificate. &lt;/p&gt;
&lt;h2&gt;Patching the rest…&lt;/h2&gt;
&lt;p&gt;Once the new farm is created you have a few options depending on how many servers you have in your WAC farm. For instance if you have more than two, then you can take another one out of rotation, patch it and join it to the new and patched farm and then you flip the load balancer so it points to the new WAC farm. Depending on your load balancer you might have a brief moment where end-user request might be served by both versions. A bit funky situation but it works, as the illustration below shows:&lt;/p&gt;
&lt;p&gt;&lt;img title="Dual versions..." style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Dual versions..." src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013-Patching-your-WAC-f_8BAA/image_21.png" width="132" height="240"&gt;&lt;/p&gt;
&lt;p&gt;In my case I have two servers, so once I created the new farm I just put the patched server into the NLB rotation and then immediately take the RTM server out of rotation. Once the RTM WAC Server is taken out of rotation I remove WAC from that machine and start the patching process. All requests to the WAC farm are now on our patched server(s).&lt;/p&gt;
&lt;p&gt;&lt;img title="One March 2013 and the other one is being patched" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="One March 2013 and the other one is being patched" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013-Patching-your-WAC-f_8BAA/image_22.png" width="132" height="240"&gt;&lt;/p&gt;
&lt;p&gt;As you can see, simple PowerShell operations this time as well, and this can (and should) be automated.&lt;/p&gt;&lt;pre class="brush: powershell; toolbar: false"&gt;# On the new patched WAC Server
Get-NlbClusterNode -NodeName $env:COMPUTERNAME | Start-NlbClusterNode

# On the RTM WAC Server
Get-NlbClusterNode -NodeName $env:COMPUTERNAME | Stop-NlbClusterNode -Drain
Remove-OfficeWebAppsMachine

&lt;/pre&gt;
&lt;p&gt;Once the other server(s) are patched, you need to join it to the newly created (and patched) WAC farm – just as you normally join a server to a WAC farm. And then you’re done. You’re farm is now patched and ready! But wait, there’s some stuff you have to do on the SharePoint side to enjoy all the new cool features.&lt;/p&gt;
&lt;p&gt;&lt;img title="All new and shiny!" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="All new and shiny!" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013-Patching-your-WAC-f_8BAA/image_23.png" width="134" height="240"&gt;&lt;/p&gt;
&lt;h2&gt;Configuring new WOPI bindings&lt;/h2&gt;
&lt;p&gt;One of the most interesting new features in the March 2013 update of Office Web Apps is the ability to view PDF documents! Yup, you heard me right! The March 2013 update contains a couple of new WOPI bindings that enable viewing and previewing (even mobile views) for PDF documents. These new WOPI binding has an application name called &lt;strong&gt;WordPdf&lt;/strong&gt;. If you try to use the &lt;em&gt;New-SPWOPIBinding&lt;/em&gt; cmdlet and just specify the WAC server name, you will get an error – since you already have those WOPI bindings. What you need to do is to specify the name of the application as an extra parameter to the command, like this:&lt;/p&gt;&lt;pre class="brush: powershell; toolbar: false"&gt;New-SPWOPIBinding - ServerName wac.corp.local -Application WordPdf&lt;/pre&gt;
&lt;p&gt;&lt;img title="WOPI Bindings" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="WOPI Bindings" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013-Patching-your-WAC-f_8BAA/image_24.png" width="600" height="262"&gt;&lt;/p&gt;
&lt;p&gt;Another approach could be to remove all the bindings and then add them all back again – of course this would cause a few seconds of downtime, and that’s not how I roll…&lt;/p&gt;
&lt;p&gt;Once you’ve run that command (and waited a couple of seconds) you can start previewing PDF documents in your Document Libraries. And now we got yet another good reason not to install the crapware called Adobe Reader!&lt;/p&gt;
&lt;p&gt;&lt;img title="Viewing PDF documents" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Viewing PDF documents" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013-Patching-your-WAC-f_8BAA/SNAGHTML241ee80_1.png" width="657" height="345"&gt;&lt;/p&gt;
&lt;p&gt;Now, your end users can start taking advantage of all the new features in the March 2013 update.&lt;/p&gt;
&lt;h3&gt;New Excel WOPI Bindings!&lt;/h3&gt;
&lt;p&gt;If you’re examining the WOPI bindings provided by the March 2013 update really carefully, you’ll notice that the Excel application has six new bindings, three each for the two new actions &lt;em&gt;syndicate&lt;/em&gt; and &lt;em&gt;legacywebservice&lt;/em&gt;. We cannot use these two bindings in SharePoint 2013 RTM – the New-SPWOPIBinding cmdlet does not accept those actions. They are not a part of the well-known WOPI action values (as specified in the WOPI specification available when this post is written) – and I have at the moment no clue of what they are doing…stay tuned…&lt;/p&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;You’ve just seen how simple patching an Office Web Apps 2013 farm is. Compare that to patching SharePoint! By using the load balancer effectively you can make sure that the end-users can continue to use the Office Web Apps features while you’re doing the patching. Enjoy!&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=yX3raqFsryw:9VJ1n7MT1o8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=yX3raqFsryw:9VJ1n7MT1o8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=yX3raqFsryw:9VJ1n7MT1o8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=yX3raqFsryw:9VJ1n7MT1o8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=yX3raqFsryw:9VJ1n7MT1o8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=yX3raqFsryw:9VJ1n7MT1o8:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=yX3raqFsryw:9VJ1n7MT1o8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=yX3raqFsryw:9VJ1n7MT1o8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/yX3raqFsryw" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/office-web-apps-2013-patching-your-wac-farm-with-no-downtime</feedburner:origLink></item><item><title>SharePoint 2013: Intelligent Promoted Results and Best Bets</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/46JzQObRwkE/sharepoint-2013-intelligent-promoted-results-and-best-bets</link><pubDate>Sun, 10 Mar 2013 09:50:00 PDT</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/sharepoint-2013-intelligent-promoted-results-and-best-bets</guid><description>&lt;h2&gt;Introduction&lt;/h2&gt; &lt;p&gt;The search engine and search experience in SharePoint 2013 has been totally re-written, since its predecessors. In SharePoint 2010 we had something called &lt;em&gt;Best Bets&lt;/em&gt; or &lt;em&gt;Visual Best Bets&lt;/em&gt; if you worked with FAST for SharePoint. A best bet was a promoted result that was triggered by one or more keywords, used by the search admins to promote certain links or banners for specific search queries. In SharePoint 2013 this is now called a &lt;em&gt;Promoted Results&lt;/em&gt; and the procedure of creating them is different and so much better – there’s more ways to trigger on, more ways to render the results etc, but the actual shown result isn’t that smart, until now…&lt;/p&gt; &lt;p&gt;In this post I will show you how to create an even smarter and more intelligent Promoted Result – a best bet that actually uses the search query to do something interesting with. In this sample I will let users enter simple math questions and then we let the promoted result calculate the math question for you (just as the big search engines on the interwebz does).&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Intelligent-Best-Bets_E052/SNAGHTML5e5971.png"&gt;&lt;img title="SNAGHTML5e5971" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="SNAGHTML5e5971" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Intelligent-Best-Bets_E052/SNAGHTML5e5971_thumb.png" width="600" height="276"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt;Creating Promoted Results aka Best Bets&lt;/h2&gt; &lt;p&gt;A Promoted Result is created either on Search Service Application, Site Collection or Site level using the Search Query Rules option. To create a new Site Collection scoped Promoted Result you navigate to &lt;em&gt;Site Settings &amp;gt; Search Query Rules&lt;/em&gt;. Next thing to do is to choose which scope to create this Query Rule for, choose &lt;em&gt;Local SharePoint Results &lt;/em&gt;in this case. You have the option to further narrow down the Query Rule using segments and topic categories, but that’s not relevant for this exercise. Next thing to do is to click on &lt;em&gt;New Query Rule&lt;/em&gt;. The Add Query Rule page contains quite a few options to make sweet things happening. First we have to give it a name and then we have to specify the query conditions. &lt;em&gt;Query Conditions&lt;/em&gt; is what is used to trigger this promoted result. In order to trigger on our “mathematical” question we need to use a regular expression. To use a regular expression as the Query Condition you have to select &lt;em&gt;Advanced Query Text Match &lt;/em&gt;and then write a regular expression. &lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Intelligent-Best-Bets_E052/SNAGHTML6b29a7.png"&gt;&lt;img title="SNAGHTML6b29a7" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="SNAGHTML6b29a7" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Intelligent-Best-Bets_E052/SNAGHTML6b29a7_thumb.png" width="600" height="223"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I’m no regular expression savant, but this regular expression works for this blog post. Anyone with a cooler or smarter or more complex regex – feel free to post it in the comments.&lt;/p&gt;&lt;pre class="brush: javascript; toolbar: false"&gt;\d+\s*[/\+\-\/*]\s*\d+&lt;/pre&gt;
&lt;h2&gt;Using a custom page as the Promoted Results&lt;/h2&gt;
&lt;p&gt;Next up is to add the Promoted Results Action to this Query Rule. This is done by clicking on the &lt;em&gt;Add Promoted Result &lt;/em&gt;further down on the &lt;em&gt;Add Query Rule &lt;/em&gt;page. When adding a promoted result you will be asked for a Title, a URL and a description. In our case the URL is of interest – we want to render a page containing our logic to calculate the math query.&lt;/p&gt;
&lt;p&gt;I let the URL point to a page (an .aspx page we’ll create in a few seconds) and then I pass two query string parameters to it; &lt;strong&gt;IsDlg=1 &lt;/strong&gt;to get rid of the chrome in the page and &lt;strong&gt;query={SearchTerms}&lt;/strong&gt; to pass the actual query to the page. I also check the check box &lt;em&gt;Render the URL as a banner instead of as a hyperlink&lt;/em&gt; so that the promoted result will be rendered as an iframe instead of a link.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Intelligent-Best-Bets_E052/SNAGHTML70ca44.png"&gt;&lt;img title="SNAGHTML70ca44" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="SNAGHTML70ca44" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Intelligent-Best-Bets_E052/SNAGHTML70ca44_thumb.png" width="507" height="223"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Seem simple, doesn’t it, but wait – this will not work until you followed all the steps in this post. There is no thing out of the box that allows you to pass the search query to the Visual Best Bet.&lt;/p&gt;
&lt;p&gt;Now click Save on the &lt;em&gt;Add Promoted Result &lt;/em&gt;page and then Save on the &lt;em&gt;Add Query Rule &lt;/em&gt;page. &lt;/p&gt;
&lt;h2&gt;Creating the custom promoted results page&lt;/h2&gt;
&lt;p&gt;Now, before we test this (and it also takes a couple of seconds before this promoted result can be used – don’t ask me why!) let’s create our page that should calculate the result from the query. For this demo we create a fairly simple .aspx page with a JavaScript section and a small HTML snippet, as shown in the snippet below:&lt;/p&gt;&lt;pre class="brush: xhtml; toolbar: false"&gt;&amp;lt;%@ Page Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, &lt;br&gt;    Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" &lt;br&gt;    MasterPageFile="~masterurl/default.master" Language="C#" %&amp;gt;
&amp;lt;asp:Content ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server"&amp;gt;
    &amp;lt;script type="text/javascript"&amp;gt;
        function getQueryStringValue(name) {
            var qs = window.location.search.substring(1);
            var pairs = qs.split("&amp;amp;");
            for (var i = 0; i &amp;lt; pairs.length; i++) {
                var pair = pairs[i].split("=");
                if (pair[0] == name) {
                    return pair[1];
                }
            }
            return '';
        }
        _spBodyOnLoadFunctions.push(function () {
            var query = getQueryStringValue("query")
            try {
                document.getElementById("result").innerHTML = eval(query)
            } catch (e) {
                document.getElementById("result").innerHTML = "error"
            }
        });
    &amp;lt;/script&amp;gt;
    &amp;lt;style&amp;gt;
        #s4-ribbonrow {
            display:none;
        }
    &amp;lt;/style&amp;gt;
&amp;lt;/asp:Content&amp;gt;

&amp;lt;asp:Content ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server"&amp;gt;
    Intelligent Best Bet
&amp;lt;/asp:Content&amp;gt;

&amp;lt;asp:Content ContentPlaceHolderID="PlaceHolderMain" runat="server"&amp;gt;
    &amp;lt;h1&amp;gt;SharePoint Search Calculator&amp;lt;/h1&amp;gt;
    &amp;lt;h2&amp;gt;The result is: &amp;lt;span id="result"&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/h2&amp;gt;
&amp;lt;/asp:Content&amp;gt;
&lt;/pre&gt;
&lt;p&gt;The first section contains a simple JavaScript that extracts the Search Query from the query string and then uses the JavaScript &lt;strong&gt;eval()&lt;/strong&gt; method on it to “calculate” the value. In the &lt;em&gt;PlaceHolderMain&lt;/em&gt; I added a span element which is where the calculator writes the result.&lt;/p&gt;
&lt;p&gt;So let’s upload this page to the Documents library in the Search Center – which was the location I specified when creating the Promoted Results. If we now search for something that should be triggered by the Query Rule you will see the page rendered as a banner, but&amp;nbsp; it will not calculate the query as we expected. &lt;/p&gt;
&lt;h2&gt;Passing the search query to the custom promoted results page&lt;/h2&gt;
&lt;p&gt;So, why aren’t our result rendering properly? It all comes down to that the default Display Template for Best Bets/Promoted Results does not pass the search query to the iframe. In order to fix this we need to modify this Display Template. The Display Template that we need to edit is the &lt;strong&gt;Item_BestBet.html&lt;/strong&gt; file.&lt;/p&gt;
&lt;p&gt;First we add two lines, directly following the var isVBB = … line, like this&lt;/p&gt;&lt;pre class="brush: javascript; toolbar: false"&gt;var isVBB = ctx.CurrentItem.IsVisualBestBet;

var url = ctx.CurrentItem.Url
url = url.replace('{SearchTerms}',ctx.CurrentItem.ParentTableReference.Properties.QueryModification)
&lt;/pre&gt;
&lt;p&gt;The code is crafting the URL to use in the iframe by retrieving the URL from the &lt;strong&gt;CurrentItem&lt;/strong&gt; and then replacing the text &lt;strong&gt;{SearchTerms}&lt;/strong&gt; with the actual search terms used.&lt;/p&gt;
&lt;p&gt;Next we need to modify the line where the iframe is rendered.&lt;/p&gt;&lt;pre class="brush: xhtml; toolbar: false"&gt;&amp;lt;iframe id="_#= $htmlEncode(id + Srch.U.Ids.visualBestBet) =#_" 
    class="ms-srch-item-visualBestBet" title="_#= $htmlEncode(ctx.CurrentItem.Title) =#_" 
    scrolling="no" frameborder="0px" 
    src="_#= $urlHtmlEncode(url) =#_"&amp;gt;&amp;lt;/iframe&amp;gt;
&lt;/pre&gt;Modify the src attribute of the iframe element so that it uses our new url property instead of the default URL value from the current context. Save the file and go back to the Search Center… 
&lt;h2&gt;See it in action&lt;/h2&gt;
&lt;p&gt;Now we can take it for a test drive. Search for simple mathematical questions and see the results being rendered as a promoted result.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Intelligent-Best-Bets_E052/SNAGHTML80e9e4.png"&gt;&lt;img title="SNAGHTML80e9e4" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="SNAGHTML80e9e4" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Intelligent-Best-Bets_E052/SNAGHTML80e9e4_thumb.png" width="538" height="277"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;I’ve just shown you how to make the Promoted Results aka Visual Best Bets more intelligent by creating a Query Rule that promotes a web page that does operations on the search query. To get this all to work the secret ingredient was to modify the Display Template for promoted results to allow it to pass the search query to the promoted results page.&lt;/p&gt;
&lt;p&gt;I can really see this being extended to provide the users with even more interesting “intelligent” promoted results.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=46JzQObRwkE:rTJLBxvelL0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=46JzQObRwkE:rTJLBxvelL0:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=46JzQObRwkE:rTJLBxvelL0:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=46JzQObRwkE:rTJLBxvelL0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=46JzQObRwkE:rTJLBxvelL0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=46JzQObRwkE:rTJLBxvelL0:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=46JzQObRwkE:rTJLBxvelL0:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=46JzQObRwkE:rTJLBxvelL0:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/46JzQObRwkE" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/sharepoint-2013-intelligent-promoted-results-and-best-bets</feedburner:origLink></item><item><title>SharePoint 2013 Central Administration Productivity Tip</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/v5CqrHNSqMw/sharepoint-2013-central-administration-productivity-tip</link><pubDate>Wed, 06 Mar 2013 14:24:00 PST</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/sharepoint-2013-central-administration-productivity-tip</guid><description>&lt;p&gt;Here’s a short post with a tip that I find very useful. &lt;/p&gt; &lt;p&gt;In many scenarios you have several SharePoint 2013 installations to handle – it might be different farms, production environments, testing, staging, development etc. Do you know which Central Administration you’re working in at the moment? They all look the same, SharePoint Blue, the regular Status Bar warning that you’re running out of disk space etc. Unless countermeasures are taken you don’t know what environment you’re in unless you take a look at the URL – which in many cases is just another server name and port. It’s very easy to make a mistake and make a change in the production environment instead of in the test or dev environments.&lt;/p&gt; &lt;p&gt;So, how do we keep track of what Central Administration site we’re actually working on at the moment? One way could be to change the theme of the Central Admin site. But, was the production CA red or was it the one with the dog in the background? I’ve got a better tip for you!&lt;/p&gt; &lt;p&gt;Here’s how I’ve done to keep track of the Central Administration sites. I take advantage of the &lt;em&gt;Suite Link Bar&lt;/em&gt; in the upper left corner. By default it says just “SharePoint” – yes we know it’s SharePoint.&lt;/p&gt; &lt;p&gt;&lt;img title="Standard Suite Bar" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Standard Suite Bar" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Central-Administration-P_14511/SNAGHTML3766f7d_1.png" width="305" height="256"&gt;&lt;/p&gt; &lt;p&gt;By modifying the Web Application property that controls this text we can easily change it to something more friendly and appropriate for the specific farm, like below. &lt;/p&gt; &lt;p&gt;&lt;img title="Cool Suite Bar" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Cool Suite Bar" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Central-Administration-P_14511/SNAGHTML37cb9b8_1.png" width="354" height="266"&gt;&lt;/p&gt; &lt;p&gt;It’s a very simple PowerShell operation to accomplish this. You just retrieve the Central Administration Web Application object, then update the &lt;strong&gt;SuiteBarBrandingElementHtml &lt;/strong&gt;property and set it’s value to something that tells you which Central Administration site this is:&lt;/p&gt;&lt;pre class="brush: powershell; toolbar: false"&gt;asnp microsoft.sharepoint.powershell
$ca = Get-SPWebApplication -IncludeCentralAdministration | `
    ?{$_.IsAdministrationWebApplication -eq $true}
$ca.SuiteBarBrandingElementHtml = "&amp;lt;div class='ms-core-brandingText'&amp;gt;Central Admin: FarmA Production&amp;lt;/div&amp;gt;"
$ca.Update()&lt;/pre&gt;
&lt;p&gt;You should leave the &lt;em&gt;div&lt;/em&gt; element with the &lt;em&gt;ms-core-brandingText&lt;/em&gt; class, to get decent formatting of the text, but inside it you can add whatever HTML you like (I’m thinking the marquee or blink tag…).. &lt;/p&gt;
&lt;p&gt;That’s it. I hope I saved a few kittens from being slaughtered…&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=v5CqrHNSqMw:hGcBs4_61QI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=v5CqrHNSqMw:hGcBs4_61QI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=v5CqrHNSqMw:hGcBs4_61QI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=v5CqrHNSqMw:hGcBs4_61QI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=v5CqrHNSqMw:hGcBs4_61QI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=v5CqrHNSqMw:hGcBs4_61QI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=v5CqrHNSqMw:hGcBs4_61QI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=v5CqrHNSqMw:hGcBs4_61QI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/v5CqrHNSqMw" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/sharepoint-2013-central-administration-productivity-tip</feedburner:origLink></item><item><title>SharePoint 2013: Personal Site instantiation queues and bad throughput</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/5lVploguTY8/sharepoint-2013-personal-site-instantiation-queues-and-bad-throughput</link><pubDate>Tue, 05 Mar 2013 00:18:00 PST</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/sharepoint-2013-personal-site-instantiation-queues-and-bad-throughput</guid><description>&lt;p&gt;In SharePoint 2013 the way Personal Sites (aka My Sites) are created have been totally rebuilt to support the new way of utilizing the Personal Sites. In this post I will go through how Personal Sites are provisioned, asynchronously, and bust a couple of myths about how interactive Personal Site instantiations should be “prioritized” and increase throughput.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Personal-Site-instantiat_14255/SNAGHTML38eaec.png"&gt;&lt;img title="Get the most out of SharePoint" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Get the most out of SharePoint" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Personal-Site-instantiat_14255/SNAGHTML38eaec_thumb.png" width="299" height="168"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt;&lt;/h2&gt; &lt;h2&gt;Background&lt;/h2&gt; &lt;p&gt;Personal Sites or My Sites were previously created “on-demand”. When a user went to his or hers non-existing My Site the provisioning started while the user waited for the site to be created, painfully watching the spinning animated gif. This worked fine in SharePoint 2010, and earlier, but now with SharePoint 2013 so much more are depending on the user having a Personal Site – everything from the social stuff in SharePoint 2013 (yes, not all SharePoint customers have yet wandered down the Yammer road) to the really great Office 2013 interaction (SkyDrive whatever). Requiring users to “manually” creating their Personal Sites is no longer a good option…&lt;/p&gt; &lt;p&gt;&lt;em&gt;Note: this post is valid for SharePoint 2013 RTM – and hopefully some of the myths/bugs/features/stuff that is explained in this post will be fixed in upcoming releases…&lt;/em&gt;&lt;/p&gt; &lt;h2&gt;&lt;/h2&gt; &lt;h2&gt;Asynchronous Personal Site instantiation&lt;/h2&gt; &lt;p&gt;In SharePoint 2013 the Personal Site is no longer created synchronously while the users wait for the site to be created. Instead all Personal Site provisioning are handled asynchronously by the Timer Job service (OWSTIMER.exe). So how does all this work? Whenever a user visits the My Site Host for the first time they are forced to create a Personal Site (depending on the My Site creation settings in the User Profile Service Application). The Personal Site instantiation are then added to one of possibly three queues (more about these in a bit). A set of timer jobs picks up the instantiation requests from these queues, creates the Personal Site and finally sends an e-mail to the user. The benefits of this new approach are many; the user can continue to do other stuff in SharePoint (real productive work instead of facetweeting for instance), the provisioning are not hogging the w3wp.exe process, we avoid performance bottlenecks, we should(!) see improved Personal Site creation throughput etc. There are of course drawbacks of this approach, such as it could potentially take some time before the personal site is created, since we have to wait for the timer job etc. But all in all this is something that is necessary (especially for the cloud) and something is very good.&lt;/p&gt; &lt;h2&gt;The&amp;nbsp; Instantiation queues&lt;/h2&gt; &lt;p&gt;I mentioned that there are three queues for the Personal Site instantiation. &lt;/p&gt; &lt;ul&gt; &lt;li&gt;The Interactive Request Queue  &lt;li&gt;The Second Interactive Request Queue  &lt;li&gt;The Non-interactive Request Queue&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;First of all – the difference between the Interactive and Non-interactive requests are basically that all “requests” to create a Personal Site through the web user interface are called interactive, while those requests coming from the Office client are non-interactive. The reason of having a second interactive request queue is that requests coming from the user interface – users actually wanting to facetweet – should have a higher priority and a higher personal site provisioning throughput. &lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Personal-Site-instantiat_14255/SNAGHTML48ee1a.png"&gt;&lt;img title="SNAGHTML48ee1a" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="SNAGHTML48ee1a" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Personal-Site-instantiat_14255/SNAGHTML48ee1a_thumb.png" width="600" height="91"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Each queue are (by default) polled every minute, by three timer jobs – one per queue, Each Timer Job will retrieve five (5) items from the queue and process them one at a time. According to some (ahem, SPC12) presentations this timer job are executed on every WFE, but that’s not what happens in real life. The Timer Jobs are based on the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spworkitemjobdefinition.aspx" target="_blank"&gt;SPWorkItemJobDefinition&lt;/a&gt; Job Definition Type. This is a really nice timer job implementation that has a queue per content database. In this case the queue exists in the Content Database where the &lt;em&gt;My Site Host&lt;/em&gt; is residing. This also means since the lock type of the job is Content Database per Web Application – only one server will run this timer job. So, to sum it up – for each queue and every minute a total of 5 Personal Sites can be created, which means about 300 Personal Sites per hour per queue – if you have the hardware that can handle that! One might think now that since there are two interactive queues, we can get a throughput of 600 Personal Sites an hour, well…no…&lt;/p&gt; &lt;h2&gt;&lt;/h2&gt; &lt;h2&gt;The second (and useless) interactive queue&lt;/h2&gt; &lt;p&gt;The idea with the second interactive queue is that interactive personal site requests should have a higher throughput, and that is a good idea. But unfortunately something went wrong when this was implemented. Stop reading now if you don’t like digging deep into SharePoint internals and just accept the fact that this implementation is flawed…&lt;/p&gt; &lt;p&gt;The three queues, or rather the three Timer Jobs are created per Web Application through a hidden feature called &lt;strong&gt;MySitesInstantiationQueues&lt;/strong&gt;. This feature creates the timer jobs and also configures an object in the config database (SPPersistedObject) which contains a value of how many queues that should be used. The &lt;strike&gt;funny &lt;/strike&gt;thing is that this is an internal definition (the SPPersistedObject) and it sets the number of instantiation queues to &lt;strong&gt;1, not 2&lt;/strong&gt;. This means that we’re hardcoded to only have one instantiation queue, and the second interactive timer job just don’t do anything since it’s queue is always empty – even though we could use reflection to modify it, but then we’re in unsupported territory. So there goes the idea of bumping up the number of Personal Sites created asynchronously.&lt;/p&gt; &lt;p&gt;You can very easily see this in the ULS logs:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Personal-Site-instantiat_14255/SNAGHTML6fb133.png"&gt;&lt;img title="[Enque selection] GetWorkItemGuidHelper: Choosing first interactive queue instance as we are using only one queue." style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="[Enque selection] GetWorkItemGuidHelper: Choosing first interactive queue instance as we are using only one queue." src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Personal-Site-instantiat_14255/SNAGHTML6fb133_thumb.png" width="600" height="67"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Also, if we take a look directly at the configuration object we’ll see that it is configured only for one queue:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Personal-Site-instantiat_14255/SNAGHTML7313d6.png"&gt;&lt;img title="SNAGHTML7313d6" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="SNAGHTML7313d6" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Personal-Site-instantiat_14255/SNAGHTML7313d6_thumb.png" width="600" height="165"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;So the idea of having servers provisioning up to 600 Personal Sites an hour we instead have 300 Personal Sites per farm per hour. Imagine a new corporate portal launch spiced with social features for 20.000 users and about 5% of the users visiting the site at launch. This will give us 1.000 users in the queue and a potential queue time of 3:20 hours, at least – not that great in my opinion. Just imagine if you did some marketing of your new launch and only a couple of more users tried to use the social features…&lt;/p&gt; &lt;p&gt;Well, the good thing is that we don’t have the web servers hogged with creating thousands of Personal Sites, prohibiting real work.&lt;/p&gt; &lt;h2&gt;&lt;/h2&gt; &lt;h2&gt;&lt;/h2&gt; &lt;h2&gt;Increasing the throughput anyways…&lt;/h2&gt; &lt;p&gt;This section should really be classified under the unsupported things you shouldn’t do, ever, unless you need to… But for a large Enterprise Social deployment using SharePoint 2013 it might be a necessity, to not piss the end users off by having them waiting four hours to get started using SharePoint 2013.&lt;/p&gt; &lt;p&gt;If you don’t want to provision all the Personal Sites in advance, which in most cases are a dumb idea, you could instead of just relying on the queues to provision the Personal Sites you could read the queue yourself and create the personal sites “manually”. You need to find the database where the My Site is hosted and then query the &lt;strong&gt;ScheduledWorkItems&lt;/strong&gt; table for items. Query for where the &lt;em&gt;Type&lt;/em&gt; is &lt;em&gt;E94A6CAA-B0F5-4897-B489-585CA50C7803&lt;/em&gt; (which is the id of the first interactive instantiation queue, the second queue has it’s own Type Id – but you will never see that in here :-)). Find those with the &lt;em&gt;InternalState &lt;/em&gt;equal to 8 – those are the ones waiting to be processed. Using this information you can use PowerShell or similar to spread out the load on other servers to create the personal sites.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Personal-Site-instantiat_14255/SNAGHTML82acf1.png"&gt;&lt;img title="SNAGHTML82acf1" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="SNAGHTML82acf1" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Personal-Site-instantiat_14255/SNAGHTML82acf1_thumb.png" width="483" height="272"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;To create the actual personal sites you could use the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.office.server.userprofiles.userprofile.createpersonalsite.aspx" target="_blank"&gt;CreatePersonalSite()&lt;/a&gt; method of the &lt;a href="http://msdn.microsoft.com/en-us/library/ms566874.aspx" target="_blank"&gt;UserProfile&lt;/a&gt; object, this method will bypass the queue and immediately create the site.&amp;nbsp; &lt;/p&gt; &lt;h2&gt;Summary&lt;/h2&gt; &lt;p&gt;By now you should be familiar with the process of how SharePoint provisions Personal Sites in SharePoint 2013. It’s a better approach than in previous versions. The idea of having multiple queues and allowing several servers to help out with provisioning the personal sites is good, but currently flawed. Hopefully this will get fixed in upcoming cumulative updates. As it is now it’s not working for a large enterprise rolling out SharePoint Enterprise Social, so you have to be very careful when planning a roll out of Enterprise Social in SharePoint 2013…or use Yammer…&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=5lVploguTY8:XCiNK1BjB9g:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=5lVploguTY8:XCiNK1BjB9g:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=5lVploguTY8:XCiNK1BjB9g:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=5lVploguTY8:XCiNK1BjB9g:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=5lVploguTY8:XCiNK1BjB9g:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=5lVploguTY8:XCiNK1BjB9g:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=5lVploguTY8:XCiNK1BjB9g:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=5lVploguTY8:XCiNK1BjB9g:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/5lVploguTY8" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/sharepoint-2013-personal-site-instantiation-queues-and-bad-throughput</feedburner:origLink></item><item><title>SharePoint 2013 and Unified Access Gateway (UAG) 2010 Service Pack 3</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/4AH_mtifzaQ/sharepoint-2013-and-unified-access-gateway-uag-2010-service-pack-3</link><pubDate>Tue, 26 Feb 2013 15:19:00 PST</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/sharepoint-2013-and-unified-access-gateway-uag-2010-service-pack-3</guid><description>&lt;p&gt;Last week the Forefront team finally released &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=36788" target="_blank"&gt;Service Pack 3 for Forefront Unified Access Gateway (UAG) 2010&lt;/a&gt;. This is a long awaited release for us working with SharePoint 2013 and for those using non-legacy operating systems and browsers. In this post I will show you how to publish SharePoint 2013 Host Named Site Collections through UAG 2010 SP3 and consume the published site using Internet Explorer 10 on Windows 8.&lt;/p&gt; &lt;h2&gt;What’s new in UAG 2010 Service Pack 3&lt;/h2&gt; &lt;p&gt;Before diving into the interesting pieces let’s take a look at some of the new features of Service Pack 3. First of all, to be able to install SP3 you need to have your UAG at SP2 level – SP3 is NOT cumulative.&lt;/p&gt; &lt;p&gt;The most interesting features in SP3 are support for Windows 8, Windows Phone 8, Windows 8 RT and Internet Explorer 10 (classic and Metro) as client, support for the Office 2013 client and support for SharePoint 2013 as the published application. For SharePoint 2013 the URL Rule Sets has been modified to handle the new types of URL’s and request patterns used in SharePoint 2013, and new endpoint policies are added for SharePoint 2013. If you’re doing an 2010-2013 upgrade, you need to look over any custom URL Rules and policies. There’s also a number of improvements with regards to ADFS publishing.&lt;/p&gt; &lt;p&gt;Get all the nitty gritty details from the KB article: &lt;a href="http://support.microsoft.com/kb/2744025" target="_blank"&gt;KB2744025&lt;/a&gt;.&lt;/p&gt; &lt;h2&gt;Infrastructure&lt;/h2&gt; &lt;p&gt;Ok, now you know what’s new! Let’s start publish our SharePoint 2013 sites through UAG. First of all before even installing UAG you need to think about your infrastructure, network, DNS and certificates (there it is again – certificates!). The picture below shows my demo environment. As you can see I have a UAG 2010 SP3 server with dual NIC’s (actually it have three – but we can safely ignore that). One NIC is connected to the &lt;em&gt;Corporate Network&lt;/em&gt; and the other one to the &lt;em&gt;External Network&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/image_18.png"&gt;&lt;img title="Demo infrastructure" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="Demo infrastructure" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/image_thumb_8.png" width="409" height="307"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;DNS&lt;/h3&gt; &lt;p&gt;Before starting our publishing and SharePoint 2013 configuration we need to plan our DNS namespace. We need at least one publically available (that is a real) domain name. For this demo I will use three:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;trunk.corp.local &lt;/strong&gt;– this will be used for my UAG Trunk Portal  &lt;li&gt;&lt;strong&gt;sp.corp.local&lt;/strong&gt; – this will be a SharePoint 2013 site  &lt;li&gt;&lt;strong&gt;teams.sp.corp.local&lt;/strong&gt; – this will be another SharePoint 2013 site&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;In order to make it efficient for the end-users I do prefer to have alignment of URL’s internally and externally. In this case it means that I have the second two domains above registered in the internal DNS as well. There is no need to register the Portal/Trunk domain internally.&lt;/p&gt; &lt;h3&gt;Certificates&lt;/h3&gt; &lt;p&gt;When publishing sensitive stuff such as SharePoint content you most likely would like to use HTTP over SSL, HTTPS, to encrypt the data flying throughout the internet. This is not only a good option to do externally, you should do it internally as well – even more now with SharePoint 2013 and the authorization flow over HTTP. Utilizing HTTPS internally also gives you the benefit of URL alignment for internal and external users and you don’t have to worry about sending an unreachable link. And we don’t have to do SSL termination.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/image_22.png"&gt;&lt;img title="Certificate request" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Certificate request" align="right" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/image_thumb_10.png" width="244" height="244"&gt;&lt;/a&gt;What you essentially need is one or two certificates – one from a trusted root authority to use on the UAG server and one for SharePoint, which can be a local CA issued certificate. You could use the same though. You should use wildcard certs or SAN certificates here – so in the end it comes down to manageability and costs of certificates.&lt;/p&gt; &lt;p&gt;In this sample I use one certificate, issued by my local CA. So any external clients, not joined to the domain will get a certification error (unless they have the CA root cert as a trusted root authority – which my external demo machine have). Specifically the Office clients have issues with not trusted certs.&lt;/p&gt; &lt;p&gt;The certificate is a SAN certificate covering sp.corp.local, trunk.corp.local and *.sp.corp.local. The certificate is installed on the SharePoint 2013 machine and on the UAG 2010 machine.&lt;/p&gt; &lt;h2&gt;SharePoint with HTTPS&lt;/h2&gt; &lt;p&gt;Before starting the UAG configuration let’s take a quick look at how the SharePoint 2013 farm is configured. In the SharePoint farm there is one Web Application using SSL on port 443. This Web Application is used to host Host Named Site Collections. This installation has two; sp.corp.local and teams.corp.local.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/SNAGHTML306085.png"&gt;&lt;img title="Web Applications" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Web Applications" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/SNAGHTML306085_thumb.png" width="510" height="83"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt;Install and update UAG 2010 to SP3&lt;/h2&gt; &lt;p&gt;Installing Unified Access Gateway 2010 and patch it to Service Pack 3 is quite easy. But first of all – UAG 2010 SP3 does not support Windows Server 2012, so you have to dust off your old Windows Server 2008 R2 DVD’s and get used to that annoying Start button in the lower left corner.&lt;/p&gt; &lt;p&gt;Before inserting the DVD though, make sure that the OS is patched – yea, this machine should be a secure box and should have all the latest security hotfixes etc. Secondly make sure that you have the two required NIC’s wired in. Third – configure the NIC’s. If you’re uncertain on how to configure the NIC’s there is a good TechNet Wiki article called “&lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/3198.recommended-network-adapter-configuration-for-forefront-uag-servers.aspx" target="_blank"&gt;Recommended Network Adapter Configuration for Forefront UAG&lt;/a&gt;” that is highly recommended as a starting point.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/image_4.png"&gt;&lt;img title="Installation" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Installation" align="right" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/image_thumb_1.png" width="244" height="224"&gt;&lt;/a&gt;Once all that is set, insert the DVD and follow the wizard to install UAG. If your DVD is a UAG SP1 you need to apply the following patches, in this order, to get up on Service Pack 3.&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://support.microsoft.com/kb/2585140" target="_blank"&gt;UAG Service Pack 1 Update 1&lt;/a&gt;  &lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/hh509006.aspx" target="_blank"&gt;TMG Service Pack 2&lt;/a&gt;  &lt;li&gt;&lt;a href="http://support.microsoft.com/kb/2710791" target="_blank"&gt;UAG Service Pack 2&lt;/a&gt;  &lt;li&gt;&lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=36788" target="_blank"&gt;UAG Service Pack 3&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Once that is done a reboot is not out of order. Especially if you fiddled with the NIC’s and haven’t rebooted since.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h2&gt;&lt;/h2&gt; &lt;h2&gt;Initial UAG configuration&lt;/h2&gt; &lt;p&gt;Once you’re up on UAG Service Pack 3 it’s time to do the first time configuration of UAG. It’s a three step wizard that automatically starts when you fire up the UAG Management console the first time – and you can’t bypass it. &lt;/p&gt; &lt;p&gt;The first step is to connect UAG to your different NIC’s. As I said you need two of them – one for the internal network and one for the external network. In the Network Configuration Wizard (Step 1 in the UAG Getting Started Wizard) you have to choose which adapter to connect to the UAG Internal and External zone respectively. A good practice is to name your network adapters (in Windows) and give them describing names so they are not called just “Local Area Connection 1” and “Local Area Connection 2” – very easy to make stupid mistakes then…&lt;/p&gt; &lt;p&gt;The image below shows how I connected my “Corporate Network” NIC to the Internal UAG zone and the “External Network” to the External UAG zone. The machine have a third NIC – which I leave unassigned in this case.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/image7.png"&gt;&lt;img title="UAG NIC Settings" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="UAG NIC Settings" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/image7_thumb.png" width="307" height="357"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Click Next when you’re done and finish the wizard. Step 2 in the Getting Started Wizard let’s you specify the UAG topology – leave it as as a single server and finish the wizard. Step 3 is the obligatory – do you want Windows Update and do you want to send usage data to &lt;a href="http://www.microsoft.com" target="_blank"&gt;Microsoft&lt;/a&gt; – I’ll leave it up to you to figure out the settings here.&lt;/p&gt; &lt;blockquote&gt;Note: you can always get back to the Getting Started Wizard by choosing Admin &amp;gt; Getting Started in the UAG Management app.&lt;/blockquote&gt; &lt;p&gt;Now all is set to start publishing some applications. &lt;/p&gt; &lt;h2&gt;&lt;/h2&gt; &lt;h2&gt;Creating a UAG Trunk&lt;/h2&gt; &lt;p&gt;All applications in UAG are published in &lt;em&gt;Trunks&lt;/em&gt;. A trunk consists of a portal and one or more applications. Each trunk have a set of shared settings between the different published applications – such as a public host name, certificate, URL Rules, endpoint policies, authentication and authorization settings etc.&lt;/p&gt; &lt;p&gt;Since we would like to publish an HTTPS SharePoint 2013 application we start with creating a new Trunk under the “HTTPS Connections” node in the UAG Management App. &lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/image10.png"&gt;&lt;img title="New Trunk..." style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="New Trunk..." src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/image10_thumb.png" width="240" height="162"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;This will start yet another wizard (YAW). In Step 1 choose to create a Portal trunk. In Step 2 we need to specify the name, public host name and IP of the trunk.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/SNAGHTML17c73b0.png"&gt;&lt;img title="Trunk Settings" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Trunk Settings" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/SNAGHTML17c73b0_thumb.png" width="240" height="181"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Step 3 is used to configure how the end-user will authenticate. Click Add to select (at least) one Authentication Server. If you don’t have any servers in the server list you need to add one. You have a lot of options here – but in most cases you will add an Active Directory server and connect it to your forest. You also need a service account for this – that needs permissions to retrieve user information and change password.&lt;/p&gt; &lt;p&gt;In Step 4 it’s time to select the external certificate. Hopefully you followed the instructions and have already registered the certificate on the UAG box. Choose the appropriate certificate and click next. If you’re like me and using a dummy domain (corp.local) you will get a warning here – it’s safe to ignore, we’re only writing a blog post.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/SNAGHTML16d419d.png"&gt;&lt;img title="Certificate Settings" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Certificate Settings" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/SNAGHTML16d419d_thumb.png" width="240" height="167"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The fifth step allows you to select what kind of endpoint protection you would like to use. Choose between UAG access policies or NAP. Choose UAG and continue to step 6, where you choose the endpoint policies – keep the default ones and continue. Then review your settings and click finish.&lt;/p&gt; &lt;p&gt;That’s it, you now have a trunk. All you now need to do is to save and then activate your new configuration. This is done through the cog wheel button in the management console.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/SNAGHTML174cf45.png"&gt;&lt;img title="Activation" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Activation" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/SNAGHTML174cf45_thumb.png" width="217" height="148"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;You should now be able to test if you can access the trunk from a remote machine. The first time you access the trunk URL you will be asked to download and install the Forefront UAG client components. Depending on your configuration you will have limited access to your applications unless you install it. These components does a number of client security validations and they are also responsible for cleaning up your machine when you log out. Once logged in you should see an “empty” portal saying “No applications defined”. &lt;/p&gt; &lt;p&gt;If you don’t see anything like this or get errors here – it’s most likely related to certificates. Make sure that you have a correctly issued certificate registered with the Trunk. Also check the certificate chain and make sure that all the certs in the chain are trusted.&lt;/p&gt; &lt;h2&gt;Add an application to the trunk&lt;/h2&gt; &lt;p&gt;Now the time has come to publish our SharePoint 2013 Site Collection. In the Trunk you created under Applications click the Add button. YAW! In Step 1 you specify what kind of application you want to publish. You will find SharePoint 2013 under Web – it’s called “Microsoft &lt;strong&gt;Office(!)&lt;/strong&gt; SharePoint Server 2013”.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/image_26.png"&gt;&lt;img title="SharePoint 2013 Application" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="SharePoint 2013 Application" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/image_thumb_12.png" width="190" height="240"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Click next, give the application a name. In Step 3 leave all the endpoint policies as-is – you could easily spend a day fiddling with these if you have the time or need. In the fourth step choose to publish an Application Server. You should choose this if you have one server or a SharePoint farm behind some kind of load balancer. Step 5 is where you configure the actual SharePoint 2013 application. Add the name of your internal SharePoint 2013 site and specify the public host name. In my case my SharePoint 2013 site is published using HTTPS internally so I need to specify HTTPS/443 here – no SSL Termination.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/image_28.png"&gt;&lt;img title="Web Servers" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Web Servers" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/image_thumb_13.png" width="190" height="240"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Step 6 – Authentication. Choose an authentication server (use the same as you created and used for the Trunk). Here you also specify how rich clients authenticate with your application – in my case I choose to use both Rich Client integration and a Office Forms Based AuthN. &lt;/p&gt; &lt;p&gt;In the seventh step you configure how the application appears in the portal and in the eight and last step you can configure which users actually have access to your application, but just leave the default settings for now – that is everyone who can log in can also access the application (note, that this doesn’t mean they bypass any security in SharePoint).&lt;/p&gt; &lt;p&gt;Once you’re done with the wizard you should have two applications listed in your trunk – the portal and your newly added SharePoint site:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/SNAGHTML1885001.png"&gt;&lt;img title="Applications" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Applications" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/SNAGHTML1885001_thumb.png" width="401" height="163"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now save and activate your new configuration.&lt;/p&gt; &lt;h2&gt;Take it for a test-drive…&lt;/h2&gt; &lt;p&gt;Close down your browsers, if you did test to log in to the Trunk earlier, and browse to the public portal URL once again. If you don’t see your application – log out of the portal and log in again.&lt;/p&gt; &lt;p&gt;You should see something like this:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/SNAGHTML18ac7c8.png"&gt;&lt;img title="The Portal" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="The Portal" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/SNAGHTML18ac7c8_thumb.png" width="240" height="137"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now, click on the application link and see how beautifully your SharePoint 2013 site is published through UAG. Test how you can drag and drop documents, open them in Office clients, edit lists in Quick Edit mode and work just perfectly!&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/SNAGHTML18ec1f8.png"&gt;&lt;img title="Woohoooo...." style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Woohoooo...." src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-and-Unified-Access-Gatew_1384B/SNAGHTML18ec1f8_thumb.png" width="240" height="218"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Publishing the second SharePoint 2013 Site Collection is exactly the same – you add a new Application to the trunk and follow the wizard.&lt;/p&gt; &lt;h2&gt;Summary&lt;/h2&gt; &lt;p&gt;In this post I showed you how to install, patch and configure Forefront Unified Access Gateway (UAG) 2010 Service Pack 3 to be able to publish SharePoint 2013 Web Applications and Site Collections. It’s a pretty straightforward approach but involves some crucial steps. If you previously published SharePoint 2010 applications using UAG you noticed that there is no difference with regards to setting it up. The difference are in the details, specifically in the URL rules applied and a new set of policies.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=4AH_mtifzaQ:nTIZGnD3pQ4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=4AH_mtifzaQ:nTIZGnD3pQ4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=4AH_mtifzaQ:nTIZGnD3pQ4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=4AH_mtifzaQ:nTIZGnD3pQ4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=4AH_mtifzaQ:nTIZGnD3pQ4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=4AH_mtifzaQ:nTIZGnD3pQ4:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=4AH_mtifzaQ:nTIZGnD3pQ4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=4AH_mtifzaQ:nTIZGnD3pQ4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/4AH_mtifzaQ" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/sharepoint-2013-and-unified-access-gateway-uag-2010-service-pack-3</feedburner:origLink></item><item><title>SharePoint 2013: SharePoint Health Score and Throttling deep dive</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/3Z7TRx8Est4/sharepoint-2013-sharepoint-health-score-and-throttling-deep-dive</link><pubDate>Mon, 11 Feb 2013 14:33:00 PST</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/sharepoint-2013-sharepoint-health-score-and-throttling-deep-dive</guid><description>&lt;p&gt;The SharePoint Health Score was introduced in SharePoint 2010 and plays an even more important role in SharePoint 2013. The Health Score determines the health of a SharePoint server/web application on a scale from 0 to 10, where 0 is the most healthy state. SharePoint automatically starts throttling request once the Health Score is to high. The Health Score is can be calculated using many parameters, such as memory usage, concurrent requests etc. In this post I will give you some details on how the Health Score works, how you can troubleshoot it and how you can use it and how you can configure it.&lt;/p&gt;
&lt;blockquote style="color: red;"&gt;Note: this article contains some registry changes that never ever should be done on a production server, unless told by Microsoft support...or whatever...&lt;/blockquote&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;h2&gt;What is the Health Score?&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s start with some background facts. Stop whining, I know plenty of peeps have already blogged about it but I think it is good to have all the facts in this same blog post.&lt;/p&gt;
&lt;p&gt;The Health Score is as an integer between 0 and 10, where 0 represents a really good health of the server, or rather Web Application, and 10 is where you do not want to be. SharePoint continuously calculates the Health Score and for each and every request the Health Score is sent as an HTTP Response Header, called &lt;code&gt;X-SharePointHealthScore&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_2.png"&gt;&lt;img width="386" height="43" title="The SharePoint Health Score in action!" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="The SharePoint Health Score in action!" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_thumb.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This Health Score is used by (or at least should be used by) client applications to determine the health of the web application and then use it to make a decision on whether it should stop hammering the web application or not. If the Health Score reaches up to 10, SharePoint itself will start to throttle requests (which we&amp;rsquo;ll talk about in just a bit).&lt;/p&gt;
&lt;p&gt;Worth noticing here is even though this article is written for SharePoint 2013, most of it is valid on SharePoint 2010 as well.&lt;/p&gt;
&lt;h2&gt;How the SharePoint Health Score is calculated&lt;/h2&gt;
&lt;p&gt;So, how does SharePoint calculate this Health Score? When a SharePoint Web Application spins up, internally a new thread is created (you can see it in debuggers with the name &lt;em&gt;SPPerformanceInspector&lt;/em&gt;). This thread regularly reads performance counters and calculates the Health Score. Each time it calculates the Health Score it will log this to the Trace Logs (Category=Http Throttling, Level=Verbose):&lt;/p&gt;
&lt;p&gt;&amp;ldquo;&lt;em&gt;The current health score for web application is X&lt;/em&gt;&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_6.png"&gt;&lt;img width="660" height="53" title="ULS shows you the current health score" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="ULS shows you the current health score" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_thumb_2.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;h3&gt;Performance Counters&lt;/h3&gt;
&lt;p&gt;The Health Score is calculated from a set of Performance Counters. By default SharePoint 2013 (and SharePoint 2010) uses two performance counters for this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Memory/Available MBytes&lt;/li&gt;
&lt;li&gt;ASP.NET/Requests Current&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can easily retrieve these performance counters by using the following cmdlet:&lt;/p&gt;
&lt;pre class="brush: powershell; toolbar: false"&gt;Get-SPWebApplicationHttpThrottlingMonitor http://app.contoso.com&lt;/pre&gt;
&lt;p&gt;You can also use the &lt;a href="http://technet.microsoft.com/en-US/library/ff607944(v=office.15).aspx" target="_blank"&gt;&lt;code&gt;Set-SPWebApplicationHttpThrottlingMonitor&lt;/code&gt;&lt;/a&gt; cmdlet to modify the current monitors.&lt;/p&gt;
&lt;h3&gt;Buckets, what is that!?&lt;/h3&gt;
&lt;p&gt;When running the cmdlet above, to retrieve the performance counters used to calculate the Health Score, you should have noticed that each associated performance counter has a property called &lt;code&gt;AssociatedHealthScoreCalculator&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_8.png"&gt;&lt;img width="404" height="79" title="Buckets of what?" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="Buckets of what?" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_thumb_3.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is an array of values, or a set of &lt;em&gt;Buckets&lt;/em&gt;, that SharePoint uses to calculate the Health Score. There are 10 buckets in each of those (you can have fewer). Each bucket represents a Health Score value and corresponds to a lower limit of the performance counter. For instance if you have 24 current ASP.NET requests &amp;ndash; you will have a Health Score of 4 and if you have less than 200 MB of RAM available you will have a Health Score of 6. The Health Score of the Web Application is equal to the largest Health Score of all measured performance counters.&lt;/p&gt;
&lt;h3&gt;Adding your own ,monitor&lt;/h3&gt;
&lt;p&gt;To add your own performance counters to monitor you need to use the API. Here&amp;rsquo;s a sample on how to add the CPU usage as a monitored object. You should not add this one into any production environment, but it can be used in testing scenarios when you would like to see what happens when the Health Score is high.&lt;/p&gt;
&lt;pre class="brush: c-sharp; toolbar: false"&gt;$throttle  = (Get-SPWebApplication http://app.contoso.com).HttpThrottleSettings
$throttle.AddPerformanceMonitor("Processor", "% Processor Time", "_Total", 10, $true)
$throttle.Update()&lt;/pre&gt;
&lt;p&gt;This will create a new monitor for the Web Application that checks the processor time on the machine. It will only have one bucket. So if the processor time is larger than 10 it will yield a Health Score of 10.&lt;/p&gt;
&lt;h3&gt;Refresh Interval&lt;/h3&gt;
&lt;p&gt;The Health Scores are by default updated every 5 seconds. You can get (or set) this setting by looking at the &lt;code&gt;HttpThrottlingSettings&lt;/code&gt; of a Web Application like this:&lt;/p&gt;
&lt;pre class="brush: powershell; toolbar: false"&gt;$throttle = (Get-SPWebApplication http://app.contoso.com).HttpThrottleSettings
$throttle.RefreshInterval&lt;/pre&gt;
&lt;p&gt;To avoid having spikes in performance counters creating high Health Scores, the actual value is calculated from an average of a number of samples, by default 12 samples. This can be configured using the &lt;code&gt;NumberOfSamples&lt;/code&gt; property on the &lt;code&gt;HttpThrottleSettings&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;How SharePoint uses the Health Score&lt;/h2&gt;
&lt;p&gt;Now you know a little bit more on how the SharePoint Health Score is calculated. So what is it used for then? SharePoint internally uses it for mainly two reasons; HTTP throttling and for the Request Management Service.&lt;/p&gt;
&lt;h3&gt;HTTP Throttling&lt;/h3&gt;
&lt;p&gt;Whenever the SharePoint Health Score reaches the value of 10, SharePoint 2013 starts its throttling mechanism to protect the servers. As soon as the Health Score is below 10, the servers stops the throttling. The actual throttling is divided into two steps &amp;ndash; the first and second stage. After receiving a Health Score of 10 and SharePoint enters throttling it will start with the first stage and requests will start to be throttled. After one minute of throttling the throttling enters the second stage and starts throttling even more. What&amp;rsquo;s being throttled in the different stages depends on a set of &lt;em&gt;throttling classifiers&lt;/em&gt;. Out of the box (in SharePoint 2013) there is only one classifier used &amp;ndash; which checks if the current request is a search crawler. This classifier starts throttling request directly in the first stage &amp;ndash; all other requests are handled as usual. When the throttling enter the second stage all requests will be throttled (default, if you have any custom classifiers some requests might be allowed).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_12.png"&gt;&lt;img width="279" height="109" title="The Server is busy now. Try again later" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="The Server is busy now. Try again later" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_thumb_5.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Throttled requests are met with the Error message above: &amp;ldquo;The Server is busy now. Try again later&amp;rdquo;, and the HTTP Response: &amp;ldquo;503 Service Unavailable&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;When entering the second stage of throttling, you will see the following lines in the ULS logs. The logs also includes the &amp;ldquo;Excessive&amp;rdquo; counters.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_16.png"&gt;&lt;img width="604" height="52" title="Ouch, we're hogging the machine!" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="Ouch, we're hogging the machine!" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_thumb_7.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To the Server is Busy response SharePoint also adds two Response Headers; one called &amp;ldquo;Retry-After&amp;rdquo; which contains a numeric value which should be taken as an indication (by clients) when a retry operation should be done (it&amp;rsquo;s always has the same value as the Health Score refresh interval) , and a second one &amp;ldquo;SharePointError&amp;rdquo; which always has the value of &amp;ldquo;2&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;By the way, if you notice the nice little error icon in the Busy error. That image is not throttled, why? Well, I can tell you&amp;hellip;there&amp;rsquo;s actually an exclusion for that specific image with regards to resource throttling. Requests to that image will never be throttled.&lt;/p&gt;
&lt;h3&gt;HTTP Throttling of POST Requests?&lt;/h3&gt;
&lt;p&gt;There&amp;rsquo;s this myth out there that POST and PUT requests are never throttled. Well, that is to good to be true! My tests and reverse engineering skills shows that all requests are throttled in SharePoint 2013 (I would be glad to be proven wrong :). Fortunately Office 2010 and later has the &amp;ldquo;Upload Center&amp;rdquo; which will retry any save operations and eventually succeed once throttling has stopped.&lt;/p&gt;
&lt;p&gt;But, using one of the built-in classifiers we can actually make sure that our precious documents are saved regardless of HTTP Throttling, and this is how this is achieved.&lt;/p&gt;
&lt;pre class="brush: c-sharp; toolbar: false"&gt;$classifier = New-Object Microsoft.SharePoint.Utilities.SPHttpUserAgentAndMethodClassifier 
    -Args "","POST","HttpMethodMatch", "Never"
$throttle = (Get-SPWebApplication http://app.contoso.com).HttpThrottleSettings
$throttle.AddThrottleClassifier($classifier)
$throttle.Update()&lt;/pre&gt;
&lt;p&gt;First of all we create a new classifier of the type &lt;code&gt;SPHttpUserAgentAndMethodClassifier&lt;/code&gt;, when creating that object we pass in &amp;ldquo;POST&amp;rdquo; as HTTP method, make sure it&amp;rsquo;s using the HttpMethodMatch method to match the method :), and finally we tell it to never throttle these requests. We add this classifier object to the throttle settings of the web application and badabing, POST operations are not longer throttled.&lt;/p&gt;
&lt;h3&gt;Turning off HTTP Throttling&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_14.png"&gt;&lt;img width="185" height="79" title="On or Off?" align="right" style="background-image: none; float: right; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="On or Off?" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_thumb_6.png" border="0" /&gt;&lt;/a&gt;Ok, so you&amp;rsquo;re fed up with this throttling and want to turn it off. It&amp;rsquo;s an easy operation and you can do it from Central Administration or from PowerShell. In PowerShell just update the &lt;code&gt;PerformThrottle&lt;/code&gt; property of the &lt;code&gt;HttpThrottleSettings&lt;/code&gt; of the web application. And in Central Administration you select the Web Application for which you want to turn off throttling, then select General Settings &amp;gt; Resource Throttling, then at the bottom of the dialog you will find HTTP Request Monitoring and Throttling.&lt;/p&gt;
&lt;h3&gt;HTTP Throttling and automagic garbage collection&lt;/h3&gt;
&lt;p&gt;The HTTP Throttling is actually a quite smart implementation, and internally tries to fix your machine if throttling occurs. One thing that is important here is if you start fiddling with the different performance counters used for calculating the Health Score, make sure that you do not remove the monitor that monitors memory usage. That plays a special role in the throttling scenario. If that specific monitor is considered an &amp;ldquo;Excessive&amp;rdquo; monitor, which means that it has an Health Score of 10, it will actually force a Garbage Collection.&lt;/p&gt;
&lt;h3&gt;Request Management&lt;/h3&gt;
&lt;p&gt;SharePoint 2013 introduced the new Request Management Service, which is used to &amp;ldquo;redirect&amp;rdquo; requests to specific servers based on rules and/or health. When using health based rules, it is the SharePoint Health Score that is used to determine the health of a server. Whenever a machine receives a request it will update the Health Score in the Request Management service, which makes the Health Based Request Management a very efficient way to &amp;ldquo;load balance&amp;rdquo; the requests for optimal performance.&lt;/p&gt;
&lt;p&gt;For more information about Request Management read &lt;a href="http://www.harbar.net/articles/sp2013rm1.aspx" target="_blank"&gt;Spencer Harbars series about it&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;How to use the SharePoint Health Score&lt;/h2&gt;
&lt;p&gt;Whenever you&amp;rsquo;re building a client that interacts with SharePoint 2013, for instance a SharePoint App, a Windows 8 app or a Windows Phone app, then you should strongly consider always take the Health Score in consideration. You will receive the &lt;code&gt;X-SharePointHealthScore&lt;/code&gt; response header for each and every CSOM, REST or web service call to SharePoint. If the value is 10 (and SharePoint starts throttling) then you will most likely not be able to get data. If your application is constantly polling SharePoint for information, perhaps you should increase the delays between your calls when the Health Score raises above a predetermined number.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.andrewconnell.com/blog/archive/2011/04/16/sharepoint-health-score-something-to-add-to-your-sharepoint-based.aspx" target="_blank"&gt;Andrew Connell has a small code sample&lt;/a&gt; on how to leverage this in a Silverlight app.&lt;/p&gt;
&lt;h3&gt;The SPPerformanceInspector&lt;/h3&gt;
&lt;p&gt;You could also use the Health Score in traditional SharePoint Farm solutions (timer jobs, or other long running or resource consuming operations) using the &lt;code&gt;SPPerformanceInspector&lt;/code&gt; object. Here&amp;rsquo;s a quick sample how you can show the data in a Web Part:&lt;/p&gt;
&lt;pre class="brush: c-sharp; toolbar: false"&gt;SPPerformanceInspector pi = 
    SPPerformanceInspector.GetInspector(SPContext.Current.Site.WebApplication);

this.Controls.Add(new LiteralControl(
    String.Format("Current Health Score: {0}&amp;lt;br/&amp;gt;", pi.HealthScore)));
this.Controls.Add(new LiteralControl( 
    String.Format("Is throttling: {0}", pi.IsInThrottling())));&lt;/pre&gt;
&lt;p&gt;This Web Part retrieves the performance inspector object and then prints out the current Health Score for the current Web Application on the current machine. Also this Web Part will print out if throttling is currently going on (which you never should see anyways, since you&amp;rsquo;re throttled!).&lt;/p&gt;
&lt;h2&gt;How to debug the SharePoint Health Score&lt;/h2&gt;
&lt;p&gt;To wrap this little post up I will give you two great debugging tips &amp;ndash; they both involve editing the registry (you&amp;rsquo;re warned!). First of all if you&amp;rsquo;re building a remote application that communicates with SharePoint and you want to test how it behaves at different Health Scores. Then there&amp;rsquo;s a neat trick to give a server a constant Health Score value. You do this by adding a new DWORD key called &lt;code&gt;ServerHealthScore&lt;/code&gt; to the &lt;code&gt;HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0\WSS&lt;/code&gt; hive and then do an IISRESET. You can give this key any value from 0 to 10 and the Response Header will always show that value. It will not invoke throttling though.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_20.png"&gt;&lt;img width="405" height="41" title="ServerHealthScore regkey hack!" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="ServerHealthScore regkey hack!" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_thumb_9.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It will of course log a warning in the ULS telling you how bad this really is:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_27.png"&gt;&lt;img width="421" height="57" title="You've been warned!" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="You've been warned!" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_thumb_12.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The second tip is a cool debugging feature, and its also a small regkey hack. In the same hive as above create a new DWORD key called &lt;code&gt;DebugThrottle&lt;/code&gt; and give it the value of 1.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_22.png"&gt;&lt;img width="401" height="45" title="DebugThrottle regkey hack!" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="DebugThrottle regkey hack!" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_thumb_10.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once again you need to do an IISRESET. After that you can browse to any page and then append &lt;code&gt;debugthrottle&lt;/code&gt; to the address, for instance: http://site.contoso.com/debugthrottle. This will give you a sweet looking dashboard with all the details you need about the health of the server/web application. You can see the monitors and their Health Score history, the throttling stage, your classifiers etc.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_24.png"&gt;&lt;img width="404" height="234" title="Classy design!" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="Classy design!" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-W_14F9C/image_thumb_11.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;There you have it! All you need to know about the SharePoint Health Score and HTTP Throttling. As you can see it&amp;rsquo;s a really nice feature if used correctly &amp;ndash; by you, by third party vendors (I&amp;rsquo;m pretty sure 99% of the vendors do not care about this though) and by SharePoint itself. Just one final word of warning &amp;ndash; if you&amp;rsquo;re fiddling with monitors and classifiers make sure that you thoroughly test them, it&amp;rsquo;s really easy to get things funked up here&amp;hellip;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=3Z7TRx8Est4:WfQ28E2J0bM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=3Z7TRx8Est4:WfQ28E2J0bM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=3Z7TRx8Est4:WfQ28E2J0bM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=3Z7TRx8Est4:WfQ28E2J0bM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=3Z7TRx8Est4:WfQ28E2J0bM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=3Z7TRx8Est4:WfQ28E2J0bM:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=3Z7TRx8Est4:WfQ28E2J0bM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=3Z7TRx8Est4:WfQ28E2J0bM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/3Z7TRx8Est4" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/sharepoint-2013-sharepoint-health-score-and-throttling-deep-dive</feedburner:origLink></item><item><title>Office Web Apps 2013: Securing your WAC farm</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/gjZwLMGdc4U/office-web-apps-2013-securing-your-wac-farm</link><pubDate>Sun, 10 Feb 2013 09:16:00 PST</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/office-web-apps-2013-securing-your-wac-farm</guid><description>&lt;p&gt;With this new wave of SharePoint, the Office Web Apps Server (WAC – I don’t like the OWA acronym, that’s something else in my opinion) is its own server product, implementing the WOPI client protocol, which allows a client to retrieve documents from SharePoint on the behalf of the user. Documents &lt;u&gt;will&lt;/u&gt; flow from the WOPI servers (SharePoint, Lync, Exchange etc.) to the Office Web Apps Server – this means that potentially confidential information will be transferred from the SharePoint environment and stored/cached on another server. This could result in unnecessary information leakage and compromise the enterprise security.&lt;/p&gt; &lt;p&gt;In this post I will walk through a number of steps that you can do to properly secure your Office Web Apps 2013 farms. And you should seriously consider and implement most of these methods.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: this post focuses on the Office Web Apps Server and not a WOPI client in general (but if you’re building your own you should consider security as well!).&lt;/p&gt;&lt;/blockquote&gt; &lt;h2&gt;The WOPI protocol specification and security&lt;/h2&gt; &lt;p&gt;Note: I will not cover how WOPI clients and servers implements the server to server authentication and authorization.&lt;/p&gt; &lt;h2&gt;WAC runs as Local System&lt;/h2&gt; &lt;p&gt;To start with it is very important to know that the Office Web Apps Server 2013 runs as the Local System and Network Service on the machine it is installed on. There is no service account or anything! This means that you cannot protect your systems using dedicated accounts etc., like you do with SharePoint, SQL and other applications.&lt;/p&gt; &lt;p&gt;The images below shows the Office Web Apps Windows Service, which runs as LocalSystem.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013Securing-your-WAC-fa_A307/image_2.png"&gt;&lt;img title="Local System" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Local System" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013Securing-your-WAC-fa_A307/image_thumb.png" width="591" height="64"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;And this image shows some of the applications pools in the IIS on an Office Web Apps machine.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013Securing-your-WAC-fa_A307/image_4.png"&gt;&lt;img title="Network Service" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Network Service" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013Securing-your-WAC-fa_A307/image_thumb_1.png" width="600" height="104"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The advantage of using these local accounts is that it makes installation and configuration easier. But it is very important that you are aware of this configuration.&lt;/p&gt; &lt;h2&gt;SSL is a requirement!&lt;/h2&gt; &lt;p&gt;Exposing the Office Web Apps Server over HTTPS should be a requirement in my opinion. There is no reason not to. Having it on HTTP will only cause trouble for you; for instance if your SharePoint uses https you will not be able to render the iFrame containing the document (aka WOPI Frame) since you’re not allowed to show http content in an https environment. But first and foremost you’re sending data in clear text.&lt;/p&gt; &lt;p&gt;So what about SharePoint on HTTP then? Well, if you’re using SharePoint 2013 you should seriously consider running that over HTTPS as well – that IS a best practice. SharePoint 2013 leverages several technologies that sends tokens and credentials over the wire, OAuth for instance, so in order to have a secure environment make sure you use HTTPS for SharePoint as well. If you are running SharePoint on HTTP you must fiddle with the security settings in SharePoint to allow OAuth over HTTP – and this is not a good thing.&lt;/p&gt; &lt;h3&gt;Certificates are king!&lt;/h3&gt; &lt;p&gt;Any WAC farm running on SSL must have a certificate for the HTTPS endpoint. You can use self-signed, issue certificates using a Domain CA or buy a certificate. When you’re creating the WAC farm, using New-OfficeWebAppsFarm, you can/should specify the certificate. &lt;/p&gt; &lt;p&gt;For any SharePoint, WAC and even SQL installations nowadays certificates are more and more important. If you’re on the verge of deploying these in your organization you should consider deploying a Domain CA – which is not a lightweight task.&lt;/p&gt; &lt;h2&gt;Securing the communication using IPSec&lt;/h2&gt; &lt;p&gt;If you for some reason do not run HTTPS on SharePoint and/or WAC you could consider implementing IPSec. Unfortunately there is no button in the Control Panel that says “Use IPSec”. This is something that requires careful planning and testing. So going SSL might be an easier way. But consider the scenario where you have an internet facing web site which leverages WAC and using the HTTP protocol – then you should consider using IPSec for the communication between SharePoint and Office Web Apps Server.&lt;/p&gt; &lt;h2&gt;Firewall considerations and requirements&lt;/h2&gt; &lt;p&gt;When setting up your Office Web Apps Farm you should also configure the firewall for the WAC machines. Office Web Apps uses four different ports. It uses 80 and 443 for HTTP and HTTPS, that’s used by the end-users and the WOPI Server/Client communication. Internally Office Web Apps uses port 809 (HTTP) and 810(HTTPS) for communication between the WAC machines. I’ve only seen 809 in use, which is the default. There is no way (I’ve found at least, but internally WAC has a switch to use port 810) to configure WAC to use port 810 and if you do find a way, it’s likely unsupported. The things sent over the wire using the admin channel (809) is mainly health and configuration information for the WAC farm, but it would be nice to be able to secure this channel as well (IPSec!).&lt;/p&gt; &lt;p&gt;When installing WAC the Windows firewall is configured to allow incoming TCP connections on port 80, 443 and 809.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013Securing-your-WAC-fa_A307/image_18.png"&gt;&lt;img title="WAC Windows Firewall Rule" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="WAC Windows Firewall Rule" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013Securing-your-WAC-fa_A307/image_thumb_8.png" width="491" height="71"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;As always it is a good practice to evaluate these default rules and if you’re not using port 80, disable that port. For port 809 it might also be a good practice to make sure that it only allows incoming connections if they are secure (i.e. implement IPsec).&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013Securing-your-WAC-fa_A307/image_20.png"&gt;&lt;img title="Even more secure..." style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Even more secure..." src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013Securing-your-WAC-fa_A307/image_thumb_9.png" width="370" height="132"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt;Preventing rogue machines&lt;/h2&gt; &lt;p&gt;So far we’ve been talking about how to secure information being transmitted from and to the Office Web Apps farm. Let’s take a look at Office Web Apps farm security from another angle. Joining a new WAC machine to an Office Web Apps Farm can be quite easy. The only thing that you need is local administrator access on the WAC machine that is the master (the &lt;code&gt;Get-OfficeWebAppsMachine&lt;/code&gt; gives you the master machine). Depending on how you’re having your (virtual) metal hosted this might be a problem, too many sysadmins have to much permissions out there. If you have this access then you can easily join a rogue machine to the WAC farm and take control over it, without the users/client knowing anything about it.&lt;/p&gt; &lt;p&gt;There are a couple of methods you can and should use to protect the WAC farm. And the error messages below can also be a good troubleshooting reference…&lt;/p&gt; &lt;h3&gt;Master Machine Local Administrator&lt;/h3&gt; &lt;p&gt;If the account trying to create the new WAC machine does not have local admin access on the machine specified when joining the WAC farm you will simply get an “Access is denied”.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013Securing-your-WAC-fa_A307/image_8.png"&gt;&lt;img title="New-OfficeWebAppsMachine : Access is denied" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="New-OfficeWebAppsMachine : Access is denied" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013Securing-your-WAC-fa_A307/image_thumb_3.png" width="387" height="51"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;As a side note; if you’re not running the cmdlet using elevated privileges you will get an “You must be authenticated as a machine administrator in order to manage Office Web Apps Server”.&lt;/p&gt; &lt;h3&gt;Using the Firewall&lt;/h3&gt; &lt;p&gt;I already mentioned the firewall. If the machine joining the WAC farm cannot access the HTTP 809 channel the New-OfficeWebAppsMachine will throw a “The destination is unreachable error”.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013Securing-your-WAC-fa_A307/image_12.png"&gt;&lt;img title="The destination is unreachable error" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="The destination is unreachable error" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013Securing-your-WAC-fa_A307/image_thumb_5.png" width="604" height="41"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;This is a fairly easy way to protect the farm, but if the user has local admin access on the master machine it can easily be circumvented.&lt;/p&gt; &lt;h3&gt;&lt;/h3&gt; &lt;h3&gt;Certificate permissions&lt;/h3&gt; &lt;p&gt;If you’re using a domain CA, make sure that you protect the private key using ACL’s, or if you’re buying a certificate make sure to store the certificate private key in a secure location. If you’ve specified a certificate when the Office Web Apps farm was created, which you should have, then the user cannot join the new machine – regardless of local machine admin, since the user cannot install the certificate locally. The error message shown is “Office Web Apps was unable to find the specified certificate”.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013Securing-your-WAC-fa_A307/image_16.png"&gt;&lt;img title="Office Web Apps was unable to find the specified certificate" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Office Web Apps was unable to find the specified certificate" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013Securing-your-WAC-fa_A307/image_thumb_7.png" width="604" height="54"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;Using an Organizational Unit in Active Directory&lt;/h3&gt; &lt;p&gt;The way that &lt;a href="http://www.microsoft.com" target="_blank"&gt;Microsoft&lt;/a&gt; recommends to secure your WAC farm is to have a dedicated OU in Active Directory where the computer accounts for the WAC farm is located. When joining a new machine to the farm the cmdlet verifies that the account is in the OU specified by the WAC configuration. If it’s not then you’ll see the “The current machine is not a member of the FarmOU”.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013Securing-your-WAC-fa_A307/image_14.png"&gt;&lt;img title="The current machine is not a member of the FarmOU" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="The current machine is not a member of the FarmOU" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Office-Web-Apps-2013Securing-your-WAC-fa_A307/image_thumb_6.png" width="577" height="52"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;The Farm OU is specified when creating a new WAC farm or using the &lt;code&gt;Set-OfficeWebAppsFarm/&lt;/code&gt; cmdlet. The only caveat with this OU is that it has to be a top level OU in Active Directory. Creating that OU in your or your customers AD might cause some headache, but if you want to use the &lt;code&gt;FarmOU&lt;/code&gt; as protection method for your farm it has to be this way. That’s the way it is designed!&lt;/p&gt; &lt;p&gt;Also having all the WAC servers in a OU gives you other benefits; such as using Group Policies to control the WAC servers.&lt;/p&gt; &lt;h2&gt;Limit the WOPI Server and host access&lt;/h2&gt; &lt;p&gt;Now we’ve seen how we protect the farm from rogue machines and data tampering. Another issue with the WAC farm in it’s default configuration is that any WOPI Server can use it. Might not be a big problem for most of the internal installations, but what if you’ve designed a WAC farm and someone with a huge SharePoint collaboration implementation connects to your WAC farm. It can sure bring it down. Or if you’re exposing your Office Web Apps farm on the internet anyone on the internet can potentially use it.&lt;/p&gt; &lt;p&gt;For this purpose there’s a cmdlet called &lt;code&gt;New-OfficeWebAppsHost&lt;/code&gt;. This cmdlet allows you to specify host names that will be accepted by the WAC farm. The cmdlet interprets any domain with a wildcard. For instance the following cmdlet will allow all WOPI Servers on contoso.com (www.contoso.com, extranet.contoso.com etc.) to contact the WAC farm:&lt;/p&gt;&lt;pre class="brush: c-sharp; toolbar: false"&gt;Set-OfficeWebAppsHost -Domain "contoso.com"&lt;/pre&gt;
&lt;p&gt;Do not forget to do this!!&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;
&lt;p&gt;You’ve seen quite a few ways how to protect your WAC farm from information leakage, rogue machines, undesired excessive usage etc. Using HTTPS and certificates together with a dedicated OU in Active Directory will give you the most secured WAC Farm. Hopefully you also understand a bit more on how Office Web Apps Server works internally. It’s a magnificent and simple server product, but it should be handled with care.&amp;nbsp; &lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=gjZwLMGdc4U:Le9gGvQ3fu8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=gjZwLMGdc4U:Le9gGvQ3fu8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=gjZwLMGdc4U:Le9gGvQ3fu8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=gjZwLMGdc4U:Le9gGvQ3fu8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=gjZwLMGdc4U:Le9gGvQ3fu8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=gjZwLMGdc4U:Le9gGvQ3fu8:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=gjZwLMGdc4U:Le9gGvQ3fu8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=gjZwLMGdc4U:Le9gGvQ3fu8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/gjZwLMGdc4U" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/office-web-apps-2013-securing-your-wac-farm</feedburner:origLink></item><item><title>Sharing a Workflow Manager 1.0 farm between multiple SharePoint 2013 farms</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/ZjPjK-Qtvcw/sharing-a-workflow-manager-1.0-farm-between-multiple-sharepoint-2013-farms</link><pubDate>Thu, 10 Jan 2013 14:47:00 PST</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/sharing-a-workflow-manager-1.0-farm-between-multiple-sharepoint-2013-farms</guid><description>&lt;p&gt;SharePoint 2013 introduces a whole set of new and improved features. One of the things that is both new and vastly improved is the &lt;strong&gt;Workflow platform&lt;/strong&gt;. Workflow is no longer a part of the SharePoint core infrastructure, but instead a separate server product. Even though ye olde Workflow platform, 2010 style, is still in the product for backwards compatibility. SharePoint 2013 leverages the Azure service called &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/jj193471(v=azure.10).aspx" target="_blank"&gt;&lt;strong&gt;Workflow Manager 1.0&lt;/strong&gt;&lt;/a&gt;. (Not the cloud version but a local on-premises installation).&lt;/p&gt;
&lt;p&gt;The Workflow Manager 1.0 server application should be installed on a separate set of servers &amp;ndash; not on the SharePoint servers (remember; just because you can doesn&amp;rsquo;t mean you should). This introduces for some organizations more investments in physical and virtual hardware. So, what happens if you have several farms? Do you need several Workflow farms? That can be expensive! Well, as always in the SharePoint world - &lt;strong&gt;It depends!&lt;/strong&gt; If you come to the conclusion that you could use the same Workflow Farm and hardware for managing all your SharePoint Farms workflows then you can actually use the same Workflow Manager 1.0 farm. Usual disclaimers apply here &amp;ndash; it&amp;rsquo;s all up to you and your organization to decide upon designing your workflow infrastructure for this scenario, remember this can make backup/restore and DR a bit problematic since now your farms are sharing the same workflow databases etc.&lt;/p&gt;
&lt;p&gt;Let me show you a multi-tenant Workflow farm, how it works and how you do to set it up properly&amp;hellip;&lt;/p&gt;
&lt;p&gt;&lt;img width="339" height="140" title="Workflow Service" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="Workflow Service" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Sha.0-farm-between-SharePoint-2013-farms_13CD3/image_7.png" border="0" /&gt;&lt;/p&gt;
&lt;h2&gt;Multi-tenancy in Workflow Manager 1.0&lt;/h2&gt;
&lt;p&gt;Azure Workflow Manager 1.0 is multi-tenant aware through &lt;strong&gt;Scopes&lt;/strong&gt;. &amp;ldquo;A scope is a named and securable container for Activities, Workflows, Instances, configuration and child Scopes.&amp;rdquo; &amp;ndash; that is directly stolen from the Workflow Manager documentation. Everything that runs inside Workflow manager belongs to a Scope. By default a Root Scope is created when you set up the Workflow Manager farm. You can see details about the Root Scope by navigating to the HTTP/HTTPS port of your farm. The URL should look something like this: http://wffarm.corp.local:12291 for HTTP and https://wffarm.corp.local:12290 for HTTPS.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Sha.0-farm-between-SharePoint-2013-farms_13CD3/image_2.png"&gt;&lt;img width="404" height="102" title="Workflow Manager Root Scope" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="Workflow Manager Root Scope" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Sha.0-farm-between-SharePoint-2013-farms_13CD3/image_thumb.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;h2&gt;Connecting SharePoint 2013 to the Workflow Manager 1.0 farm&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;m not going to dive in to how to configure the Workflow Manager farm; it&amp;rsquo;s a wizard or PowerShell thingie and it&amp;rsquo;s &lt;a href="http://technet.microsoft.com/en-us/library/jj193478" target="_blank"&gt;very well documented&lt;/a&gt; &amp;ndash; you can&amp;rsquo;t fail! Once you have the Workflow farm up and running you MUST install the Workflow Client 1.0 components on all the Web Server in your SharePoint 2013 farm (you can get the bits using the &lt;a href="http://www.microsoft.com/web/downloads/platform.aspx" target="_blank"&gt;Web Platform Installer&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;All you have to do then is to register the Workflow Manager 1.0 farm with the SharePoint 2013 farm using the &lt;a href="http://technet.microsoft.com/en-us/library/jj663115.aspx" target="_blank"&gt;Register-SPWorkflowService&lt;/a&gt; cmdlet. This will register the SharePoint 2013 farm with the Workflow Manager and vice versa and it will also create the Workflow Service Application Proxy in SharePoint.&lt;/p&gt;
&lt;p&gt;You execute the cmdlet like below and pass in a URL to a site in your SharePoint 2013 farm (any site will do) and the URL to your Workflow Manager farm (if you&amp;rsquo;re using HTTP you also need to add the AllowOAuthHttp parameter).&lt;/p&gt;
&lt;pre class="brush: powershell; toolbar: false"&gt;Register-SPWorkflowService 
    -SPSite https://teams.corp.local 
    -WorkflowHostUri https://wffarm.corp.local:12290&lt;/pre&gt;
&lt;p&gt;Not only will this cmdlet do the things mentioned above, it will also create a new Scope in the Workflow Manager farm (under the Root Scope) called &lt;em&gt;SharePoint&lt;/em&gt;. You can verify this by navigating to Workflow Manager URL and append /SharePoint, like this: https://wffarm.corp.local:12290/SharePoint. In the XML returned you can see the URL to the SharePoint 2013 metadata endpoint (https://teams.corp.local/_layouts/15/metadata/json/1) under the &lt;em&gt;SecurityConfigurations&lt;/em&gt; element. Now, that was one SharePoint 2013 farm connected to the Workflow Manager farm.&lt;/p&gt;
&lt;p&gt;So, let&amp;rsquo;s jump on over to our second SharePoint 2013 farm, that we now decided should use the same Workflow farm! If we run the same cmdlet in that farm (using a different SPSite parameter URL of course) we get a nice error that says &amp;ldquo;An existing scope named &amp;ldquo;SharePoint&amp;rdquo; already exists in the workflow server&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Sha.0-farm-between-SharePoint-2013-farms_13CD3/image_4.png"&gt;&lt;img width="604" height="64" title="An existing scope named 'SharePoint' already exists in the workflow server" style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" alt="An existing scope named 'SharePoint' already exists in the workflow server" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Sha.0-farm-between-SharePoint-2013-farms_13CD3/image_thumb_1.png" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You see, this scope is already taken by some other farm (the one we previously connected)! The clever one might think that oh, I&amp;rsquo;ll just use the Force parameter of that cmdlet and override this. Well, if you&amp;rsquo;re that smart then you will hijack that Scope from the other farm. The Scope will be recreated and the other farm will have a non-functional Workflow Service (the security configuration will now point to the SharePoint farm that hijacked the Scope).&lt;/p&gt;
&lt;blockquote&gt;&lt;strong&gt;Note&lt;/strong&gt;: the Force flag might be useful if you really want to re-create the Workflow connection using the same Scope name.&lt;/blockquote&gt;
&lt;p&gt;Instead you should use the &lt;strong&gt;ScopeName&lt;/strong&gt; parameter of the Register-SPWorkflowService cmdlet. That parameter will create a new Scope in the Workflow farm, and with that create an isolated container for this new SharePoint farm. So on our second farm we run this PowerShell cmdlet:&lt;/p&gt;
&lt;pre class="brush: powershell; toolbar: false"&gt;Register-SPWorkflowService 
    -SPSite https://farmb.corp.local 
    -WorkflowHostUri https://wffarm.corp.local:12290
    -ScopeName FarmB&lt;/pre&gt;
&lt;p&gt;Once this command is issued your Workflow Manager farm will have two child Scopes under the Root Scope; &lt;em&gt;SharePoint&lt;/em&gt; (the first farm we connected) and &lt;em&gt;FarmB&lt;/em&gt; (the second one with the ScopeName parameter). You can verify the second scope by browsing the the Workflow farm and append the Scope name to the URL, like this: https://wffarm.corp.local:12290/FarmB.&lt;/p&gt;
&lt;p&gt;Now you have two SharePoint 2013 farms using the same Workflow Manger 1.0 farm, and each SharePoint farms workflows are isolated using the Scopes in Workflow Manager. Cool!&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;ve just shown you how easy it actually is to share a Workflow Manager 1.0 farm between several instances of SharePoint 2013 farms. Now it&amp;rsquo;s up to you to decide on weather this is an appropriate way for your organization to build your infrastructure or not. Remember to plan your resources and your DR strategy!&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=ZjPjK-Qtvcw:9BEXXpS7Bdk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=ZjPjK-Qtvcw:9BEXXpS7Bdk:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=ZjPjK-Qtvcw:9BEXXpS7Bdk:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=ZjPjK-Qtvcw:9BEXXpS7Bdk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=ZjPjK-Qtvcw:9BEXXpS7Bdk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=ZjPjK-Qtvcw:9BEXXpS7Bdk:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=ZjPjK-Qtvcw:9BEXXpS7Bdk:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=ZjPjK-Qtvcw:9BEXXpS7Bdk:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/ZjPjK-Qtvcw" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/sharing-a-workflow-manager-1.0-farm-between-multiple-sharepoint-2013-farms</feedburner:origLink></item><item><title>Summing up the year of 2012 and embracing 2013</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/4S1jUHd6Jyc/summing-up-the-year-of-2012-and-embracing-2013</link><pubDate>Sun, 30 Dec 2012 03:24:00 PST</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/summing-up-the-year-of-2012-and-embracing-2013</guid><description>&lt;p&gt;Only one day and a few hours left of the year of 2012 and the time has come for me to make my (now traditional) summary post. I’ve done it now for six years (&lt;a href="http://www.wictorwilen.se/Post/Summing-up-the-year-of-2011-and-embracing-2012.aspx" target="_blank"&gt;2011&lt;/a&gt;, &lt;a href="http://www.wictorwilen.se/Post/Summing-up-the-year-of-2010-and-embracing-2011.aspx" target="_blank"&gt;2010&lt;/a&gt;, &lt;a href="http://www.wictorwilen.se/Post/Summing-up-the-year-of-2009-and-embracing-2010.aspx" target="_blank"&gt;2009&lt;/a&gt;, &lt;a href="http://www.wictorwilen.se/Post/Summing-up-the-year-of-2008-and-embracing-2009.aspx" target="_blank"&gt;2008&lt;/a&gt;, &lt;a href="http://www.wictorwilen.se/Post/Summing-up-the-year-of-2007-and-embracing-2008.aspx" target="_blank"&gt;2007&lt;/a&gt; and &lt;a href="http://www.wictorwilen.se/Post/Happy-new-year.aspx" target="_blank"&gt;2006&lt;/a&gt;) and it’s always fun to look back at what has happened during the last 12 months.&lt;/p&gt; &lt;p&gt;This year has been an interesting year to me and contained some really interesting milestones, happenings and events.&lt;/p&gt; &lt;h2&gt;Writing&lt;/h2&gt; &lt;p&gt;This year I’ve written basically the same amount of posts as in 2011, even though a new SharePoint version has been released. Basically it comes down to that I’ve been working a lot and haven’t had time to finish up some of the posts I’ve started and I’ve been busy with other commitments in the community. Anyways, I hope you enjoyed what I’ve written – I try to keep the quality up rather than the quantity.&lt;/p&gt; &lt;p&gt;What’s really cool is that I now on average have more that 1.300 daily subscribers to my blog, a 30% increase since last year. Thank you!&lt;/p&gt; &lt;p&gt;The most popular posts this year has been:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://www.wictorwilen.se/Post/How-Claims-encoding-works-in-SharePoint-2010.aspx" target="_blank"&gt;How Claims encoding works in SharePoint 2010&lt;/a&gt; – a post you should read IMO and still valid for SharePoint 2013  &lt;li&gt;&lt;a href="http://www.wictorwilen.se/Post/Visual-guide-to-Azure-Access-Controls-Services-authentication-with-SharePoint-2010-part-1.aspx" target="_blank"&gt;Visual Guide to Azure Access Control Services authentication with SharePoint 2010 – part 1&lt;/a&gt; – The first part of six posts in the &lt;a href="http://www.wictorwilen.se/Post/Visual-guide-to-Azure-Access-Controls-Services-authentication-with-SharePoint-2010-Index-Post.aspx" target="_blank"&gt;series&lt;/a&gt;.  &lt;li&gt;&lt;a href="http://www.wictorwilen.se/sharepoint-2013---introduction-to-the-minimal-download-strategy-mds" target="_blank"&gt;SharePoint 2013 – Introduction to the Minimal Download Strategy – MDS&lt;/a&gt; – An MDS overview.  &lt;li&gt;&lt;a href="http://www.wictorwilen.se/sharepoint-2013-claims-is-the-new-black" target="_blank"&gt;SharePoint 2013 – Claims is the new black&lt;/a&gt; – the post title says it all  &lt;li&gt;&lt;a href="http://www.wictorwilen.se/sharepoint-2013-a-look-at-hardware-software-and-other-requirements" target="_blank"&gt;SharePoint 2013 – A look at the hardware and software and other requirements&lt;/a&gt; – my pov on the hw and sw requirements&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;The most popular post (from all years) is still the “&lt;a href="http://www.wictorwilen.se/Post/Fix-the-SharePoint-DCOM-10016-error-on-Windows-Server-2008-R2.aspx" target="_blank"&gt;Fix the SharePoint DCOM 10016 error on Windows Server 2008 R2&lt;/a&gt;” post.&lt;/p&gt; &lt;p&gt;No books this year – done that once…&lt;/p&gt; &lt;h2&gt;MVP again..&lt;/h2&gt; &lt;p&gt;I was re-awarded the &lt;a href="http://www.microsoft.com" target="_blank"&gt;Microsoft&lt;/a&gt; Most Valuable Professional, MVP,&amp;nbsp; award for SharePoint for the third consecutive year. I’m honored by still being a part of this group of community contributors.&lt;/p&gt; &lt;h2&gt;Microsoft Certified Architect – MCA&lt;/h2&gt; &lt;p&gt;What I’m most proud of this year is that I passed the &lt;strong&gt;Microsoft Certified Architect for SharePoint, MCA, &lt;/strong&gt;certification. This is a certification, currently only held by five individuals worldwide, which proves that you can “architect” a business and technical solution based on SharePoint and related technologies. What I do like about this certification is that it is not just a test or a lab (you get those tests while doing the MCM/MCSM, which is a pre-requisite for the MCA) but instead it is a mix of interview, business case, portfolio, presentations and Q&amp;amp;A’s, where you really must show that you understand business requirements, budgets, time plans etc. You can read more about my take on the program here – &lt;a href="http://www.wictorwilen.se/Post/What-is-a-Microsoft-Certified-Architect.aspx" target="_blank"&gt;What is a Microsoft Certified Architect?&lt;/a&gt;&lt;/p&gt; &lt;h2&gt;Conferences and travels&lt;/h2&gt; &lt;p&gt;I got my fair share of travelling this year as well, a bit less than last year – which my family appreciated though. I had the opportunity to speak at a couple of conferences – where the &lt;a href="http://www.wictorwilen.se/Post/International-SharePoint-Conference-2012-wrapup.aspx" target="_blank"&gt;International SharePoint Conference 2012&lt;/a&gt; was the highlight. This conference was something extraordinary for both the attendees and us speakers. I really enjoyed working together with the team on the dev-track building out our solution and sessions and it was so fun having the whole team on the front row supporting (and a little bit of heckling) each other during the three days. I will be back next year in London!&lt;/p&gt; &lt;p&gt;I also had a blast at the first SharePoint conference in Croatia, and I hope I’m invited again and as usual our local SharePoint and Exchange Forum – which just keeps growing!&lt;/p&gt; &lt;p&gt;Microsoft arranged the SharePoint Conference 2012 in Las Vegas to unveil the spanking brand new SharePoint version…well it turned out that the product was released a month ahead, so the conference didn’t have much new information. In my opinion this was a pretty bad conference – the depths of the sessions was to low, to many of the speakers should not have been allowed on stage, and what a total disaster when all Microsoft talked about was how good the cloud is and they had no Internet connectivity. I really hope that the conference team get their stuff together and rethink a lot of things for the next conference!&lt;/p&gt; &lt;h2&gt;The Cloud&lt;/h2&gt; &lt;p&gt;I can’t really write a summary post of 2012 without talking about the Cloud. Microsoft (and other vendors) really put all their money on the cloud this year – nothing new with this, it’s been going on for years, but this year it’s more clear than ever. Well, the cloud is nothing new – it’s just a new name for the Internet, Application Service Providers, etc etc, it’s more of a marketing term. &lt;/p&gt; &lt;p&gt;Since the release of Office 365 the transition of SharePoint to the cloud has started (BPOS was first but SharePoint wasn’t cloud ready at all at that time). With this new wave of SharePoint and 365 the SharePoint cloud offering is even more evident – and we don’t know now where it will end, I’m not sure even Microsoft knows that yet. &lt;br&gt;We’ve been running 365 for a year and a half now and we still suffer a lot from different strange issues (that could be a post on it’s own!). Hopefully once upgraded the service will be more stable and useful.&lt;/p&gt; &lt;p&gt;I might sound a bit doubtful about the cloud – and I am. For the vast majority the cloud (read 365) is a great option instead of hosting and managing their own instances. But for large enterprises (the clients I’m normally working with) 365 is not even an option…&lt;/p&gt; &lt;p&gt;Only time will tell…&lt;/p&gt; &lt;h2&gt;&lt;/h2&gt; &lt;h2&gt;Predictions&lt;/h2&gt; &lt;p&gt;This is the part I really enjoy writing and thinking about at this time of the year – looking back at my last years predictions and looking in the crystal ball for the upcoming year. &lt;/p&gt; &lt;p&gt;&lt;a href="http://www.wictorwilen.se/Post/Summing-up-the-year-of-2011-and-embracing-2012.aspx" target="_blank"&gt;Last years predictions&lt;/a&gt; wasn’t that good – Silverlight is till not dead (someone hooked it up to a CPR machine) and all the browser vendors seems to be on some kind of honeymoon. My wish that 2012 was a bit less cloudy failed miserably! The only thing I think I got right was that Windows Phone would have momentum and by looking at some stats there’s some truth in that.&lt;/p&gt; &lt;p&gt;So what do I think about next year?&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Cloud, cloud and cloud!&lt;/strong&gt; The cloud marketing will continue, it will be shoved down our throats, we’ll be so sick of it by the end of 2013. But this will be the way forward. It will be really interesting to see what will happen to traditional “on-premises” products – will they vanish? Just take a look at how Microsoft has discontinued a lot of products this year!  &lt;li&gt;&lt;strong&gt;Identities, certificates, federation!&lt;/strong&gt; I think one of the most important things for next year and the years following are having a good identity infrastructure and identity management in place. This should be a priority for all companies and architects working in our business. It’s also the basic requirement to get any cloud services to work properly. &lt;li&gt;&lt;strong&gt;Apps, devices and integration!&lt;/strong&gt; For the cloud, hosted services etc to work the integration story must be better. We’ve seen a good start with Windows 8 (RT), Windows Phone 8, Office 2013 etc – but it’s not fully there yet. I think that this is what will be improved over the next 12 months and that might also be the key differentiator between the three large “ecosystems” – Windows, Linux/Android and the fruit camp.  &lt;li&gt;&lt;strong&gt;SharePoint community!&lt;/strong&gt; The SharePoint community has grown really large and it has reached some kind of “critical mass”. I’m not saying it’s to big or anything but I see the community being more divided than ever splitting up in different directions with different specializations, aspects, mind-sets etc. The number of conferences, user group is ever increasing. This year the community will change (due/thanks to the cloud) – we will see a big change in focus, we will see SharePoint professionals being Azure, Windows 8/Phone, JavaScript professionals.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;What do you think?&lt;/p&gt; &lt;h2&gt;Thank you and a happy new year!&lt;/h2&gt; &lt;p&gt;With that I would like to wish you all a Happy New Year and say thank you for 2012. I‘ve been having my doubts about 2013, but now I ‘m really looking forward to it. I have some cool events and travels planned, I know that my work at &lt;a href="http://www.connecta.se" target="_blank"&gt;Connecta&lt;/a&gt; will contain some interesting opportunities and I know that the demand for SharePoint is ever increasing…&lt;/p&gt; &lt;p&gt;&lt;img title="A view from our summerhouse" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="A view from our summerhouse" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/Summing-up-2013-a_9452/image_3.png" width="504" height="281"&gt;&lt;/p&gt; &lt;p&gt;See you on the other side!&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=4S1jUHd6Jyc:ErivxtbVVes:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=4S1jUHd6Jyc:ErivxtbVVes:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=4S1jUHd6Jyc:ErivxtbVVes:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=4S1jUHd6Jyc:ErivxtbVVes:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=4S1jUHd6Jyc:ErivxtbVVes:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=4S1jUHd6Jyc:ErivxtbVVes:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=4S1jUHd6Jyc:ErivxtbVVes:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=4S1jUHd6Jyc:ErivxtbVVes:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/4S1jUHd6Jyc" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/summing-up-the-year-of-2012-and-embracing-2013</feedburner:origLink></item><item><title>SharePoint 2013: Unable to install the pre-requisites on a disconnected machine</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/hDSkK7C0wxI/sharepoint-2013-unable-to-install-the-pre-requisites-on-a-disconnected-machine</link><pubDate>Mon, 03 Dec 2012 14:44:00 PST</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/sharepoint-2013-unable-to-install-the-pre-requisites-on-a-disconnected-machine</guid><description>&lt;p&gt;You all know that you need to install the SharePoint 2013 pre-requisites before installing SharePoint 2013 – this is done either online or offline using the pre-req installer. All the requirements are listed in the &lt;a href="http://technet.microsoft.com/en-us/library/cc262485.aspx#section4" target="_blank"&gt;Hardware and Software requirements for SharePoint 2013&lt;/a&gt; Technet article. &lt;/p&gt; &lt;p&gt;Once in a while you need to do the installation on a disconnected machine, that is a machine that is not connected to the interwebz. Then you typically Bing for a fancy script that downloads all the pre-reqs for you and you run the pre-reqs installer in unattended mode. That is where you pass in the local path to all the downloads either through a file or through the command line (I’m not going to cover that – it’s all over the web and even in the TechNet article mentioned before).&lt;/p&gt; &lt;h2&gt;&lt;/h2&gt; &lt;h2&gt;Trouble in paradise?&lt;/h2&gt; &lt;p&gt;One thing that you might stumble upon when doing a disconnected install of the SharePoint 2013 pre-reqs is that your scripts or the pre-req installer just keeps asking you to run the installer again and it just says that you need to restart your server and run the installer again. After doing that for a couple of times you most likely start inspecting the log files and you will see stuff like this:&lt;/p&gt;&lt;pre class="brush: xhtml; toolbar: false"&gt;2012-12-03 21:38:40 - Installing Microsoft WCF Data Services 5.0
2012-12-03 21:38:40 - "\\server\SP2013\PrerequisiteInstallerFiles\WcfDataServices.exe" /quiet
2012-12-03 21:42:50 - Install process returned (-2146762486)
2012-12-03 21:42:50 - [In HRESULT format] (-2146762486)
2012-12-03 21:42:50 - Last return code (-2146762486)
2012-12-03 21:42:50 - Install needs restart
&lt;/pre&gt;
&lt;p&gt;We’ll it looks like it needs a restart – but what about that HRESULT code? Let’s turn it into a hexadecimal representation – &lt;strong&gt;0x800B010A&lt;/strong&gt;. Ahaaa! Ya’ll know your HRESULTs, right. It starts with &lt;strong&gt;0x800B01&lt;/strong&gt;?? so it must be some certificate issue, and it sure is.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/6b6b27f5a9da_133FC/image_2.png"&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" align="right" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/6b6b27f5a9da_133FC/image_thumb.png" width="166" height="124"&gt;&lt;/a&gt;As you can see it fails when installing the WCF Data Services 5.0. Let’s run that installer by itself. When we do that we’ll see an error that clearly says that it is a certificate error – &lt;em&gt;A certificate chain could not be built to a trusted root authority.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The installer log file for WCF Data Services also tells it right in our face:&lt;/p&gt;&lt;pre class="brush: xhtml; toolbar: false"&gt;[0B48:0C78][2012-12-03T21:52:06]: Error 0x800b010a: Failed to verify certificate chain policy status.
[0B48:0C78][2012-12-03T21:52:06]: Error 0x800b010a: Failed to get certificate chain for authenticode certificate.
[0B48:0C78][2012-12-03T21:52:06]: Error 0x800b010a: Failed to verify signature of payload: wcf_dataservices&lt;/pre&gt;

&lt;p&gt;So there’s something wrong with our certificate validation chain here…&lt;/p&gt;
&lt;h2&gt;These darn certificates!&lt;/h2&gt;
&lt;p&gt;Having disconnected machines means one or two things with regards to patching – either they are not patched at all or the admins control the patching themselves and don’t let the right ones through. The problem here is that the machine experiencing this problem does not have its root certificates updated. It’s an easy fix – make sure you let those updates from Windows Update through or update the root certificates manually.&lt;/p&gt;
&lt;p&gt;A manual update, which should only be your last resort, can be done by downloading the &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=29434" target="_blank"&gt;Update for Root Certificates for Windows XP [April 2013] (KB931125)&lt;/a&gt;. Yup, they are for Windows XP but works perfectly on a Windows Server 2008 R2 (that’s where I tested it). Download the &lt;strong&gt;rootsupd.exe&lt;/strong&gt; file and run it on your server before the running the pre-req installer and all should be running fine from now on.&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;A short explanation and solution for something that hopefully isn’t that common – since all of you have patched servers right? &lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=hDSkK7C0wxI:hhVlSvHpL-o:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=hDSkK7C0wxI:hhVlSvHpL-o:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=hDSkK7C0wxI:hhVlSvHpL-o:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=hDSkK7C0wxI:hhVlSvHpL-o:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=hDSkK7C0wxI:hhVlSvHpL-o:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=hDSkK7C0wxI:hhVlSvHpL-o:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=hDSkK7C0wxI:hhVlSvHpL-o:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=hDSkK7C0wxI:hhVlSvHpL-o:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/hDSkK7C0wxI" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/sharepoint-2013-unable-to-install-the-pre-requisites-on-a-disconnected-machine</feedburner:origLink></item><item><title>SharePoint 2013: Building your own WOPI Client, part 4, now Search enabled</title><link>http://feedproxy.google.com/~r/WictorWilen/~3/TFA7LmPYMAU/sharepoint-2013-building-your-own-wopi-client-part-4-now-search-enabled</link><pubDate>Wed, 03 Oct 2012 04:06:00 PDT</pubDate><guid isPermaLink="false">http://www.wictorwilen.se:80/sharepoint-2013-building-your-own-wopi-client-part-4-now-search-enabled</guid><description>&lt;p&gt;Well, I thought I should write another episode of my &lt;strong&gt;Building your own WOPI Client&lt;/strong&gt; series, here’s the links to the previous episodes &lt;a href="http://www.wictorwilen.se/sharepoint-2013-building-your-own-wopi-client-part-1" target="_blank"&gt;part 1&lt;/a&gt;, &lt;a href="http://www.wictorwilen.se/sharepoint-2013-building-your-own-wopi-client-part-2" target="_blank"&gt;part 2&lt;/a&gt; and &lt;a href="http://www.wictorwilen.se/sharepoint-2013-building-your-own-wopi-client-part-3" target="_blank"&gt;part 3&lt;/a&gt;. This time around we’ll dig into another of the different actions that a WOPI Client can surface – the &lt;strong&gt;interactivepreview&lt;/strong&gt; mode.&lt;/p&gt; &lt;h2&gt;Background&lt;/h2&gt; &lt;p&gt;As you’ve seen in the previous posts we can build a viewer and an editor for C# files, to be used in document libraries for instance. What if we would like to lift up and enhance our custom file formats in search, just like Office Web Apps Server does with the Office files. We’ll you can do that very easy, and you should! In this post I’ll show you how to surface the preview mode in a Search flyout. This also means that we’re going to take a look at the new SharePoint 2013 Search Engine, the Design Manager and some funky HTML syntax.&lt;/p&gt; &lt;h2&gt;Configure indexing for C# files&lt;/h2&gt; &lt;p&gt;The first thing we need to do is to actually make SharePoint indexing our C# (.cs files). This is done in two steps. First we need to tell SharePoint 2013 Search to include the .cs file extension and then we need to tell the search engine what filter to use. To include .cs files in the index there is two ways to do it, using PowerShell or using the Central Administration. In Central Administration you go to the Search Service Application and choose &lt;em&gt;File Types&lt;/em&gt;, then click on &lt;em&gt;New File Type &lt;/em&gt;and type in cs. That’s it. Using PowerShell the following snippet works (as long as you only have one SSA):&lt;/p&gt;&lt;pre class="brush: powershell; toolbar: false"&gt;$ssa = Get-SPServiceApplication | ?{$_.TypeName -eq "Search Service Application"}
New-SPEnterpriseSearchCrawlExtension -name cs -SearchApplication $ssa&lt;/pre&gt;
&lt;p&gt;Once that is done we need to fiddle a bit with the registry (usual regedit disclaimers apply here). Start regedit.exe and navigate to &lt;b&gt;HKLM\SOFTWARE\Microsoft\Office Server\15.0\Search\Setup\ContentIndexCommon\Filters\Extensions &lt;/b&gt;and choose to add a new Key. Give the key the name “.cs” (without quotations) and then set the default value to the following (fancy crafted) Guid: &lt;strong&gt;{0FF1CE15-002C-0000-0000-000000000000}&lt;/strong&gt;. All you now have to do is to restart the Search Engine like using the PowerShell below and then start a full crawl:&lt;pre class="brush: powershell; toolbar: false"&gt;Restart-Service OSearch15&lt;/pre&gt;
&lt;p&gt;Now when you search for any content in your .cs files it should look something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Building-your-own-WOPI-C_AADA/image_2.png"&gt;&lt;img title="Boring search result" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Boring search result" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Building-your-own-WOPI-C_AADA/image_thumb.png" width="604" height="204"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It’s something, but not what we want…&lt;/p&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;h2&gt;Building the WOPI Preview&lt;/h2&gt;
&lt;p&gt;Before we start customizing the UI let’s build the &lt;strong&gt;interactiepreview&lt;/strong&gt; mode of the WOPI client. Just as we did in the &lt;a href="http://www.wictorwilen.se/sharepoint-2013-building-your-own-wopi-client-part-3" target="_blank"&gt;previous post, when we added the edit mode&lt;/a&gt;, we need to add a new &lt;strong&gt;action&lt;/strong&gt; to the discovery file and then remove and add the bindings again (for that PowerShell, see previous post). This is the action I’ve added to my WOPI Client:&lt;/p&gt;&lt;pre class="brush: xhtml; toolbar: false"&gt;&amp;lt;action name="interactivepreview"
        ext="cs"
        default="false"
        urlsrc="http://wacky.corp.local/csharp/preview.aspx?&amp;amp;lt;ui=UI_LLCC&amp;amp;amp;&amp;amp;gt;&amp;amp;lt;rs=DC_LLCC&amp;amp;amp;&amp;amp;gt;" /&amp;gt;&lt;/pre&gt;
&lt;p&gt;As you can see that the urlsrc points to a preview.aspx web form. That web form is essentially a copy of the viewer.aspx, with the exception of the menu which I have removed. In a real world scenario you might consider having very different viewers for the normal view mode and the interactivepreview mode. You want this process to be fast and you might just generate a thumbnail or something. &lt;/p&gt;
&lt;p&gt;When all is compiled and deployed, and you have removed and re-added the WOPI bindings, it’s time to hook this up to search.&lt;/p&gt;
&lt;h2&gt;Creating the Display Templates&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Building-your-own-WOPI-C_AADA/image_6.png"&gt;&lt;img title="Finding the Design Manager" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Finding the Design Manager" align="right" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Building-your-own-WOPI-C_AADA/image_thumb_2.png" width="167" height="244"&gt;&lt;/a&gt;Let’s build the search interface. The SharePoint 2013 Search Interface does not any longer require extensive XSLT skills but instead plain ol’ HTML hacking. Every &lt;strong&gt;Result Type&lt;/strong&gt; in SharePoint 2013 Search can have it’s own &lt;strong&gt;Display Templates&lt;/strong&gt;, and there’s two of them; the normal item view and the flyout/hover view. The easiest way to create new Display Templates is to copy an existing one. For this sample let’s use the Word Display Templates.&lt;/p&gt;
&lt;p&gt;You will find the Display Templates in the new &lt;strong&gt;Design Manager &lt;/strong&gt;(which exists in a Search Center or a site with the Publishing features enabled). You access the Design Manager through the Site Settings menu. Once in the Design Manager you should choose Display Templates in the menu on the left hand side. Then I usually filter on &lt;em&gt;Target Control Type&lt;/em&gt;, to narrow down on the Display Templates used for Search; choose &lt;em&gt;SearchResults&lt;/em&gt; and &lt;em&gt;SearchHoverPanel&lt;/em&gt;. Now scroll down to the Word Item and Word Hover Panel. You’ll see two of each but we’re only interested in the HTML files for now. Download those two files to your local disc and name them &lt;em&gt;Item_Cs.html &lt;/em&gt;and &lt;em&gt;Item_Cs_HoverPanel.html &lt;/em&gt;respectively.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Building-your-own-WOPI-C_AADA/image_8.png"&gt;&lt;img title="The Word Display Templates" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="The Word Display Templates" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Building-your-own-WOPI-C_AADA/image_thumb_3.png" width="604" height="112"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now open these two files in your favorite HTML tool – for me that is Visual Studio 2012. There’s a lot of weird stuff in here as you will notice, lots of comments and JavaScripts. I’m not digging into all the details here, that’s for &lt;a href="http://blog.drisgill.com/" target="_blank"&gt;Randy Drisgill&lt;/a&gt; or someone else to do. 
&lt;p&gt;Let’s do some simple string replacement. In both files replace “Word” with “Cs” as the first thing. Next update the &lt;strong&gt;mso:MasterPageDescription &lt;/strong&gt;to something more appropriate and the &lt;strong&gt;title&lt;/strong&gt; tag, perhaps replace “Microsoft Word” with “C#”. In the Item_Cs.html file&amp;nbsp; locate the second div having an id equal to &lt;strong&gt;"_#= $htmlEncode(itemId) =#_"&lt;/strong&gt; and remove everything inside it and replace with this instead:&lt;pre class="brush: xhtml; toolbar: false"&gt;&amp;lt;div class="ms-srch-item-title"&amp;gt;
  &amp;lt;h3 class="ms-srch-ellipsis"&amp;gt;
    &amp;lt;a class="ms-srch-item-link" href="_#= ctx.CurrentItem.Path =#_"&amp;gt;_#= ctx.CurrentItem.Title =#_&amp;lt;/a&amp;gt;
  &amp;lt;/h3&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div class="ms-srch-item-body"&amp;gt;
   _#= Srch.U.processHHXML(ctx.CurrentItem.HitHighlightedSummary) =#_
&amp;lt;/div&amp;gt;
&amp;lt;div id="_#= $htmlEncode(hoverId) =#_" class="ms-srch-hover-outerContainer"&amp;gt;&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;p&gt;What this does is that we’re first rendering the title of the document with the value &lt;strong&gt;ctx.CurrentItem.Title&lt;/strong&gt;. All these JavaScript variables are enclosed in &lt;strong&gt;__#= … =#_&lt;/strong&gt;. Then we output the hit highlighted summary using a built-in method (&lt;strong&gt;Srch.U.processHHXML&lt;/strong&gt;). Finally there’s an empty div which will contain the flyout (The flyout is defined in the Item_Cs_HoverPanel.html file). There is one final thing that we need to do and that is to update the &lt;strong&gt;hoverUrl&lt;/strong&gt;&amp;nbsp; JavaScript variable in this Item_Cs.html file. It should point to the Item_Cs_HoverPanel.js file like this:&lt;/p&gt;&lt;pre class="brush: javascript; toolbar: false"&gt;var hoverUrl = "~sitecollection/_catalogs/masterpage/Item_Cs_HoverPanel.js";&lt;/pre&gt;
&lt;p&gt;Notice that it points to a JS file, not the HTML file. And also that it’s located directly in the masterpage gallery and not in a subfolder (compared to the original Word html file).&lt;/p&gt;
&lt;p&gt;The Item_Cs_HoverPanel needs no more changes than replacing Word with Cs and updating the title and description.&lt;/p&gt;
&lt;p&gt;To add these Display Templates to the Design Manager, just drag and drop them into your browser where you downloaded the original Display Templates. The files will end up as Draft version so go ahead and publish both of the HTML files.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Building-your-own-WOPI-C_AADA/image_10.png"&gt;&lt;img title="The Display Templates" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="The Display Templates" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Building-your-own-WOPI-C_AADA/image_thumb_4.png" width="604" height="64"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once the files are approved, the Design Manager will create two JS files from these HTML files and that’s what’s used behind the scenes when rendering the search results.&lt;/p&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;h2&gt;Create a Result Type&lt;/h2&gt;
&lt;p&gt;The final thing we have to do is to tell the Search Center to actually use our newly crafted Display Templates when finding C# files. For that we need to create a new &lt;strong&gt;Result Type&lt;/strong&gt;. Go to &lt;em&gt;Site Settings &lt;/em&gt;and choose &lt;em&gt;Search Result Types &lt;/em&gt;under Site Collection Administration. Click on New Result Type to start creating it. Give the Result Type an appropriate name, for instance “C# Files”. Under &lt;em&gt;Conditions&lt;/em&gt; choose &lt;em&gt;Show more conditions&lt;/em&gt; and select the &lt;em&gt;FileExtension&lt;/em&gt; property and set it so that it “&lt;em&gt;Equals any of…&lt;/em&gt;” and enter “&lt;em&gt;cs&lt;/em&gt;” in the text box. Under &lt;em&gt;Actions&lt;/em&gt; choose the C# item in the drop down and then simply click &lt;em&gt;Save&lt;/em&gt;. You should now have a Result Type looking like this: 
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Building-your-own-WOPI-C_AADA/image_12.png"&gt;&lt;img title="The C# Result Type" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="The C# Result Type" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Building-your-own-WOPI-C_AADA/image_thumb_5.png" width="604" height="52"&gt;&lt;/a&gt; 
&lt;h2&gt;&lt;/h2&gt;
&lt;h2&gt;Test the stuff…&lt;/h2&gt;
&lt;p&gt;All that is left is now to test if all this works. Go to the search page of you Search Center and search for something you know exists in your C# files, that by now should have been indexed. You should then see something like this: 
&lt;p&gt;&lt;a href="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Building-your-own-WOPI-C_AADA/image_14.png"&gt;&lt;img title="The WOPI Client in the search result" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="The WOPI Client in the search result" src="http://www.wictorwilen.se/Media/Default/Windows-Live-Writer/SharePoint-2013-Building-your-own-WOPI-C_AADA/image_thumb_6.png" width="604" height="312"&gt;&lt;/a&gt; 
&lt;p&gt;You see the items (using the Item_Cs Display Template) and if you hover over one of the search results then you see the preview from the WOPI Client being generated (using the Item_Cs_HoverPanel). Isn’t that nice, huh? 
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;In this post you’ve seen yet another way to leverage a WOPI Client, this time in search, using a preview mode of the files. You have also seen how “easy” it is to generate a custom search result design using the Design Manager, Display Templates and Result Types. I’m really looking forward to seeing WOPI Clients for all kinds of different formats out there…&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=TFA7LmPYMAU:QqwkGV5GDA4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=TFA7LmPYMAU:QqwkGV5GDA4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=TFA7LmPYMAU:QqwkGV5GDA4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=TFA7LmPYMAU:QqwkGV5GDA4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=TFA7LmPYMAU:QqwkGV5GDA4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=TFA7LmPYMAU:QqwkGV5GDA4:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/WictorWilen?a=TFA7LmPYMAU:QqwkGV5GDA4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/WictorWilen?i=TFA7LmPYMAU:QqwkGV5GDA4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/WictorWilen/~4/TFA7LmPYMAU" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.wictorwilen.se:80/sharepoint-2013-building-your-own-wopi-client-part-4-now-search-enabled</feedburner:origLink></item></channel></rss>
