<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Dr. Z's Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/zwsong/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/zwsong/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 05:37:01 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Constrains On Setting Up Cloud SSA</title>
      <link>https://docs.microsoft.com/archive/blogs/zwsong/constrains-on-setting-up-cloud-ssa</link>
      <pubDate>Wed, 15 Mar 2017 22:17:17 GMT</pubDate>
      <dc:creator><![CDATA[Dr. Z]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/zwsong/?p=246</guid>
      <description><![CDATA[A couple of gotchas I have encountered during setting up Cloud SSA (or Cloud Search Service...]]></description>
      <content:encoded><![CDATA[A couple of gotchas I have encountered during setting up Cloud SSA (or Cloud Search Service Application, you can find out more about it at <a target="_blank" href="https://support.office.com/en-us/article/Learn-about-cloud-hybrid-search-for-SharePoint-af830951-8ddf-48b2-8340-179c1cc4d291?ui=en-US&amp;rs=en-US&amp;ad=US">Learn about cloud hybrid search for SharePoint</a>):
<ol>
 	<li>On on-premises SharePoint side, only Integrated Windows Authentication (either NTLM or Kerberos) is supported. ADFS or other SAML based trusted identity providers would not work. Yes, you can still set up Cloud SSA on a web application, for example, using ADFS authentication. The Cloud SSA configuration will run through but users, both online and on-premises, will not be able to get desired search results on either online or on-premises content: all content secured using ADFS identities would be trimmed off.</li>
 	<li>On-premises user accounts must be sync'd to AAD to be able to use Cloud SSA. If an on-premises use's identity is not sync'd to Office 365 AAD, search engine will return "Sorry, something went wrong" message, and if you drill-down to the detail, it looks something like this:</li>
</ol>
<p style="padding-left: 60px"><em>System.Net.WebException: The remote server returned an error: (401) Unauthorized. at System.Net.HttpWebRequest.GetResponse() at Microsoft.SharePoint.Client.SPWebRequestExecutor.Execute() at Microsoft.SharePoint.Client.ClientContext.GetFormDigestInfoPrivate() at Microsoft.SharePoint.Client.ClientContext.EnsureFormDigest() at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery() at Microsoft.Office.Server.Search.RemoteSharepoint.RemoteSharepointEvaluator.RemoteSharepointProducer.RetrieveDataFromRemoteServer(Object unused) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at Microsoft.Office.Server.Search.RemoteSharepoint.RemoteSharepointEvaluator.RemoteSharepointProducer.ProcessRecordCore(IRecord record)</em></p>
<p style="padding-left: 60px"><em><strong>Correlation ID:</strong> c662de9d-434f-00ec-d613-50b7ebedcef3</em></p>
The above behaviors are confirmed with SharePoint 2016 and Office 365 product team. The PG does not have a timeline to "fix" the #1 issue and for issue #2 it actually makes sense for Cloud SSA to act that way.

Dr. Z]]></content:encoded>
    </item>
    <item>
      <title>Update SharePoint Workflow Manager's SQL Connection Strings</title>
      <link>https://docs.microsoft.com/archive/blogs/zwsong/update-sharepoint-workflow-managers-sql-alias</link>
      <pubDate>Wed, 15 Mar 2017 19:58:35 GMT</pubDate>
      <dc:creator><![CDATA[Dr. Z]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/zwsong/?p=235</guid>
      <description><![CDATA[If for whatever reason you need to change your SharePoint Workflow Manager's SQL connection strings...]]></description>
      <content:encoded><![CDATA[If for whatever reason you need to change your SharePoint Workflow Manager's SQL connection strings (there are 3 for SB and 3 for WF farm), here is what you have to do:
<ol>
 	<li>Run Get-SBFarm and Get-WFFarm PowerShell cmdlets and record all the outputs. This is very important and you will need the information to finalize the script below.</li>
 	<li>Remove all your servers from the existing Workflow Manager and Service Bus farms. You can do this via Workflow Manager's configuration wizard.</li>
 	<li>Run Restore-SBFarm, <span style="color: #000000">Restore-SBMessageContainer,</span> and Restore-WFFarm cmdlet with the new SQL connection strings and SB and WF farms' configuration database names.</li>
 	<li>Add the servers back to Workflow Manager and Service Bus farms, You can do this via Workflow Manager's configuration wizard.</li>
 	<li>Run Get-SBFarm, Get-SBMessageContainer and Get-WFFarm PowerShell cmdlets to confirm the new connection strings.</li>
 	<li>Remove the old SB and WF farm databases.</li>
</ol>
The above steps and scripts will restore the existing SB and WF farms to new SB and WF configuration DBs with all certificates intact therefore you do not need to re-register with SharePoint again. They are tested with SharePoint 2013 only and I hope it works for SharePoint 2016 as well.

Below is the script you for step #3:
<p style="padding-left: 30px">### Restoring SB Farm</p>
<p style="padding-left: 30px">Restore-SBFarm -FarmCertificateThumbprint &lt;SB farm cert thumbprint&gt; -GatewayDBConnectionString '&lt;new SB gateway db connection string&gt;' -SBFarmDBConnectionString '&lt;new SB farm db connection string (must provide a new database name)&gt;' -EncryptionCertificateThumbprint &lt;SB encryption cert thumbprint&gt; -RunAsAccount '&lt;SB run as account&gt;';</p>
<p style="padding-left: 30px">Restore-SBMessageContainer -Id 1 -ContainerDBConnectionString '&lt;new SB container db connection string&gt;';</p>
<p style="padding-left: 30px">### Restoring WF Farm</p>
<p style="padding-left: 30px">Restore-WFFarm -OutboundCertificateThumbprint &lt;outbound cert thumbprint&gt; -SslCertificateThumbprint &lt;SSL cert thumbprint&gt; -EncryptionCertificateThumbprint &lt;encryption cert thumbprint&gt; -RunAsAccount '&lt;run as account&gt;' -WFFarmDBConnectionString '&lt;new farm db connection string (must provide a new database name)&gt;' -InstanceDBConnectionString '&lt;new instance db connection string&gt;' -ResourceDBConnectionString '&lt;new resource db connection string&gt;' -InstanceStateSyncTime '&lt;date time&gt;' -ConsistencyVerifierLogPath '&lt;file path&gt;';</p>
Good luck!

Dr. Z]]></content:encoded>
    </item>
    <item>
      <title>SQL Server 2016 Log Shipping Jobs Fail Silently</title>
      <link>https://docs.microsoft.com/archive/blogs/zwsong/sql-2016-log-shipping-jobs-fail-silently</link>
      <pubDate>Sun, 13 Nov 2016 10:12:06 GMT</pubDate>
      <dc:creator><![CDATA[Dr. Z]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/zwsong/?p=225</guid>
      <description><![CDATA[Lately found out a solution to a very strange SQL 2016 Log Shipping issue: its LSBackup_&lt;db...]]></description>
      <content:encoded><![CDATA[Lately found out a solution to a very strange SQL 2016 Log Shipping issue: its LSBackup_&lt;db name&gt; job fails without any meaningful error message.  Nothing will show in SQL or Windows log. When you check its job history, you will see the job failed with below message:

Date  &lt;date time&gt;<br id="yiv6268635572yui_3_16_0_ym19_1_1479030708093_2529" />        Log  Job History (LSBackup_&lt;db name&gt;)
<div id="yiv6268635572yui_3_16_0_ym19_1_1479030708093_2530">        Step ID  1<br id="yiv6268635572yui_3_16_0_ym19_1_1479030708093_2531" />        Server  &lt;server name&gt;</div>
<div>        Job Name  LSBackup_&lt;db name&gt;<br id="yiv6268635572yui_3_16_0_ym19_1_1479030708093_2533" />        Step Name  Log shipping backup log job step.<br id="yiv6268635572yui_3_16_0_ym19_1_1479030708093_2534" />        Duration  00:00:00<br id="yiv6268635572yui_3_16_0_ym19_1_1479030708093_2535" />        Sql Severity 0<br id="yiv6268635572yui_3_16_0_ym19_1_1479030708093_2536" />        Sql Message ID 0<br id="yiv6268635572yui_3_16_0_ym19_1_1479030708093_2537" />        Operator Emailed <br id="yiv6268635572yui_3_16_0_ym19_1_1479030708093_2538" />        Operator Net sent <br id="yiv6268635572yui_3_16_0_ym19_1_1479030708093_2539" />        Operator Paged <br id="yiv6268635572yui_3_16_0_ym19_1_1479030708093_2540" />        Retries Attempted 0</div>
<div id="yiv6268635572yui_3_16_0_ym19_1_1479030708093_2541" dir="ltr">        Message<br id="yiv6268635572yui_3_16_0_ym19_1_1479030708093_2542" />        Executed as user: &lt;domain\user&gt;. The step failed.</div>
<div dir="ltr"></div>
Turns out the fix to this issue is either install .NET Framework 3.5 feature on the Windows server running SQL 2016 or install SQL Server 2016 CU1.

Please refer to <a href="https://support.microsoft.com/en-us/kb/3173666">https://support.microsoft.com/en-us/kb/3173666 </a>for detailed information regarding how to get the CU. The link is for solving a different but related issue (LSCopy job fails).

This fix was tested on Windows Server 2012 R2 and Windows Server 2016.]]></content:encoded>
    </item>
    <item>
      <title>Load Testing SAML (PING) Based SharePoint 2013 Sites</title>
      <link>https://docs.microsoft.com/archive/blogs/zwsong/load-testing-saml-ping-based-sharepoint-2013-sites</link>
      <pubDate>Wed, 23 Jul 2014 07:25:00 GMT</pubDate>
      <dc:creator><![CDATA[Dr. Z]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/zwsong/2014/07/23/load-testing-saml-ping-based-sharepoint-2013-sites/</guid>
      <description><![CDATA[I have to proof to a customer that their SharePoint infrastructure supports their user base and...]]></description>
      <content:encoded><![CDATA[<p>I have to proof to a customer that their SharePoint infrastructure supports their user base and workload. So the logical solution is to Visual Studio Team System (VSTS) to build web tests and load tests and simulate the load and see&nbsp;how the&nbsp;farm reacts.</p>
<p>There is one problem: the sites are based on SAML (PingFederate is used as the IdP).</p>
<p>SAML based sites are a lot different from sites using Windows Integration Authentication methods such as NTLM and Kerberos when users log in. The user will be redirected from SharePoint to SAML IdP, be presented a web form to fill out their username and password, be authenticated, and then be redirected back with a SAML token to SharePoint to be validated and then start browsing SharePoint content.</p>
<p>These work fine under normal user scenarios, the question is how do we turn it into web tests and load test to simulate large amount of users and requests coming to the sites and see how SharePoint farm would perform.</p>
<p>After playing with VSTS and Fiddler and a little research, I found this very useful article online: <a href="https://blogs.southworks.net/sdurandeu/2013/01/03/load-testing-adfs-federated-sharepoint-applications/">https://blogs.southworks.net/sdurandeu/2013/01/03/load-testing-adfs-federated-sharepoint-applications/</a>. It is written for ADFS but the idea stays the same. I modified the test cases and made them work for PING based SharePoint sites.</p>
<p>To test SAML sites, you need to create a web test to log in a user with SAML IdP&nbsp;first, then run subsequential web tests such as open a page, navigate the sites, search for something, and so on.</p>
<p>For the user log on web test, there are only two steps you have to take:&nbsp;</p>
<ol>
<li>Request the SAML IdP's log in page with the correct query strings and form data, to get the SAML token back</li>
<li>Come to SharePoint&rsquo;s &ldquo;/_trust/&rdquo; to validate the token and get the FedAuth token</li>
</ol>
<p>After getting the FedAuth token, you can start the real SharePoint performance and load tests.</p>
<p>All the above steps should be manually created in the VSTS and use a few variables to carry around some key factors, like the SAML token.</p>
<p>Below is the screenshot of the web test, you don&rsquo;t have to write any code:&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/22/86/3051.PING-login.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-22-86/3051.PING_2D00_login.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/22/86/3051.PING-login.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-22-86/3051.PING_2D00_login.PNG" alt="" border="0" /></a></p>
<p>In above web test the SAML token is carried around in a variable called "wresult", I also used a CSV file to store all test users&rsquo; credentials.</p>
<p>The information you have to modify according to your own environment is highlighted. Your environment may have different values for those &ldquo;w*&rdquo; variables, the best way to find&nbsp;this out is to use Fiddler to monitor a full SAML log on session, you will see the values in Fiddler&rsquo;s WebForms window.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/22/86/6683.PING-Fiddler.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-22-86/6683.PING_2D00_Fiddler.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/22/86/6683.PING-Fiddler.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-22-86/6683.PING_2D00_Fiddler.PNG" alt="" border="0" /></a></p>
<p>After you get the user log on web test, you can add other recorded SharePoint web test scenarios to your load test, just make sure you configure the user log on web test as the initial test to execute before other tests for each virtual user in your load test&rsquo;s Test Mix.</p>
<p>One more thing to keep in mind: when you run load tests against your SAML based SharePoint sites, you will put a lot of pressure on your IdP (PING in my case) as well. Just make sure that you check with the team manages the IdP before you run your load tests, you don&rsquo;t want to interfere with other users and systems that your IdP is supporting.</p>]]></content:encoded>
    </item>
    <item>
      <title>Simple way to hide Suite Links</title>
      <link>https://docs.microsoft.com/archive/blogs/zwsong/simple-way-to-hide-suite-links</link>
      <pubDate>Wed, 15 Jan 2014 08:15:00 GMT</pubDate>
      <dc:creator><![CDATA[Dr. Z]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/zwsong/2014/01/15/simple-way-to-hide-suite-links/</guid>
      <description><![CDATA[Suite Links is where you see "Newsfeed, SkyDrive, Sites" on your SharePoint site's top right...]]></description>
      <content:encoded><![CDATA[<p>Suite Links is where you see "Newsfeed, SkyDrive, Sites" on your SharePoint site's top right corner.</p>
<p>Courtesy of <a href="https://www.learningsharepoint.com/2012/08/09/sharepoint-2013-hide-newsfeed-skydrive-sites-deltasuitelinks/">https://www.learningsharepoint.com/2012/08/09/sharepoint-2013-hide-newsfeed-skydrive-sites-deltasuitelinks/</a>, you can inject a snippet of JavaScript to simply hide the DIV containing the links. However, the DIV's name has changed since the blog was publishing. Below is the correct script to do the job:</p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;">&lt;script type='text/javascript'&gt;// &lt;![CDATA[</span><br /><span style="font-family: courier new,courier;">_spBodyOnLoadFunctionNames.push("HideBrandingsuite"); </span><br /><span style="font-family: courier new,courier;">function HideBrandingsuite()</span><br /><span style="font-family: courier new,courier;">{</span><br /><span style="font-family: courier new,courier;">&nbsp;document.getElementById('DeltaSuiteLinks').style.visibility = 'hidden';</span><br /><span style="font-family: courier new,courier;">}</span><br /><span style="font-family: courier new,courier;">// ]]&gt;&lt;/script&gt;</span></p>
<p>Notice the name of the DIV has been changed to "DeltaSuiteLinks".</p>
<p>Now, how do we inject above script to a SharePoint site? Of cause you can create a control that includes the script&nbsp;and utilize Delegate Control to put it on your master pages. This is a typical full trust development and requires coding and deploying WSPs on server side. There are two more&nbsp;options that don't require any code development and server side customization:</p>
<ol>
<li>Simply put a Script Editor web part with the JS code above&nbsp;on the pages you want to hide the links. (This option only works for individual pages)</li>
<li>Modify the master page you use to include the JS code. To do this follow these steps:</li>
<ol>
<li>Navigate to your site's /_catalogs/masterpage directory and download a copy of the master page of your site (HTML version preferred if that's the case).</li>
<li>If you are using OOTB master page, change the downloaded master's name (we don't want to touch anything that is OOTB).</li>
<li>Open the downloaded master&nbsp;with a HTML editor, insert the code above to the master page and save the changes.</li>
<li>Upload the modified master page back to the site. Switch your site's master page if its name has been changed.</li>
<li>Test the new master page and make sure it works.</li>
<li>Publish the new master page.</li>
</ol></ol>
<p>Of cause the two options mentioned above&nbsp;are manual work and wouldn't scale for large amount of site collections, in that case you need to create a sandbox or full trust solution to do the job.</p>
<p>Zewei Song, Ph.D.<br />Microsoft Certified Master: SharePoint 2010<br />Microsoft Consulting Services</p>]]></content:encoded>
    </item>
    <item>
      <title>Where would you find ULS logs on Office Web Apps (OWA) 2013 server</title>
      <link>https://docs.microsoft.com/archive/blogs/zwsong/where-would-you-find-uls-logs-on-office-web-apps-owa-2013-server</link>
      <pubDate>Tue, 16 Apr 2013 13:53:00 GMT</pubDate>
      <dc:creator><![CDATA[Dr. Z]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/zwsong/2013/04/16/where-would-you-find-uls-logs-on-office-web-apps-owa-2013-server/</guid>
      <description><![CDATA[For my own record as well: C:\ProgramData\Microsoft\OfficeWebApps\Data\Logs\ULS

&nbsp;
If you do...]]></description>
      <content:encoded><![CDATA[<p>For my own record as well: C:\ProgramData\Microsoft\OfficeWebApps\Data\Logs\ULS</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/22/86/2465.OWAULSLocation.JPG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-22-86/2465.OWAULSLocation.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/22/86/2465.OWAULSLocation.JPG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-22-86/2465.OWAULSLocation.JPG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>If you do not see C:\ProgramData folder, you need to change your explorer's viewing option to "Show hidden files, folders and drives".</p>
<p>Enjoy troubleshooting OWA!</p>
<p>Zewei Song, Ph.D.<br />Microsoft Certified Master: SharePoint 2010<br />Microsoft Consulting Services</p>]]></content:encoded>
    </item>
    <item>
      <title>Where Should You Store Your SharePoint Solution’s Configuration Data?</title>
      <link>https://docs.microsoft.com/archive/blogs/zwsong/where-should-you-store-your-sharepoint-solutions-configuration-data</link>
      <pubDate>Tue, 27 Mar 2012 11:37:00 GMT</pubDate>
      <dc:creator><![CDATA[Dr. Z]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/zwsong/2012/03/27/where-should-you-store-your-sharepoint-solutions-configuration-data/</guid>
      <description><![CDATA[This is a common scenario: you are designing a great SharePoint solution and you have some...]]></description>
      <content:encoded><![CDATA[<p>This is a common scenario: you are designing a great SharePoint solution and you have some configuration information, such as URLs, connection strings, list names, and so on,&nbsp;that you have to deal with. What should you do?</p>
<p>The easiest and dirtiest way is hard-coding them in code. It maybe fine for a small and quick proof-of-concept but of cause you should not do it.</p>
<p>Next place is application config file. In the case of SharePoint solutions, it is the web.config. Configuration data stored in web.config is not hard-coded, easy to change (who doesn't like NotePad?), and very easy to access from code.</p>
<p>There are other places to store configuration data, SharePoint lists are also popular. The problem is that you have to store the lists&rsquo; sites and names somewhere else, otherwise you code would not know where to get the data. An external data store, such as SQL server, is also being used at some customers. Similarly, you have to deal with the data connection information separately as SharePoint lists.</p>
<p>However, in this blog I am going to recommend *NOT* to use any of the approaches mentioned above. To make my point, please check the comparison sheet below:</p>
<table style="width: 560px;" border="1" cellspacing="0" cellpadding="0"><colgroup><col width="167" /></colgroup><colgroup><col width="118" /></colgroup><colgroup><col width="162" /></colgroup><colgroup><col width="66" /></colgroup><colgroup><col width="124" /></colgroup><colgroup><col width="167" /></colgroup><colgroup><col width="127" /></colgroup>
<tbody>
<tr height="20">
<td class="xl63" height="20" width="167"><strong>Place</strong></td>
<td class="xl63" width="118"><strong>Location</strong></td>
<td class="xl63" width="162"><strong>Data Management Tools</strong></td>
<td class="xl63" width="66"><strong>Backup</strong></td>
<td class="xl63" width="124"><strong>Pros</strong></td>
<td class="xl63" width="167"><strong>Cons</strong></td>
<td class="xl63" width="127"><strong>Should you do this</strong></td>
</tr>
<tr height="20">
<td class="xl63" height="20" width="167"><strong>Code</strong></td>
<td class="xl64" width="118">GAC</td>
<td class="xl64" width="162">Visual Studio</td>
<td class="xl64" width="66">Server</td>
<td class="xl64" width="124">Easy</td>
<td class="xl64" width="167">Dirty</td>
<td class="xl64" width="127">HELL NO!</td>
</tr>
<tr height="64">
<td class="xl63" height="64" width="167"><strong>web.config</strong></td>
<td class="xl64" width="118">File system</td>
<td class="xl64" width="162">Notepad and so on&hellip;</td>
<td class="xl64" width="66">Server</td>
<td class="xl64" width="124">Easy</td>
<td class="xl64" width="167">Multiple copies, hard to sync. Requires to restart app pool when changed. Not being backed up&nbsp;by&nbsp;SQL</td>
<td class="xl64" width="127">No</td>
</tr>
<tr height="48">
<td class="xl63" height="48" width="167"><strong>SharePoint List</strong></td>
<td class="xl64" width="118">Content database</td>
<td class="xl64" width="162">SharePoint web UI</td>
<td class="xl64" width="66">Content db</td>
<td class="xl64" width="124">Built-in UI, easy to manage</td>
<td class="xl64" width="167">Have to store location data somewhere else. Too easy&nbsp;to manipulate</td>
<td class="xl64" width="127">Maybe</td>
</tr>
<tr height="48">
<td class="xl63" height="48" width="167"><strong>External&nbsp;</strong><strong>Data Source</strong></td>
<td class="xl64" width="118">External data source</td>
<td class="xl64" width="162">Custom</td>
<td class="xl64" width="66">Custom</td>
<td class="xl64" width="124">You have full control</td>
<td class="xl64" width="167">Have to store connection data somewhere else. Outside dependency.</td>
<td class="xl64" width="127">Maybe not</td>
</tr>
<tr height="48">
<td class="xl63" height="48" width="167"><strong>Property Bag</strong></td>
<td class="xl64" width="118">Content database</td>
<td class="xl64" width="162">Custom application page, utility</td>
<td class="xl64" width="66">Content db</td>
<td class="xl64" width="124">Backed up&nbsp;with content, on site and site collection<br />&nbsp; levels</td>
<td class="xl64" width="167">No built-in UI, have to create your own management tool</td>
<td class="xl64" width="127">Yes</td>
</tr>
<tr height="48">
<td class="xl63" height="48" width="167"><strong>Hierarchical</strong><strong>&nbsp;Object Store</strong></td>
<td class="xl64" width="118">Config database</td>
<td class="xl64" width="162">Custom application page,&nbsp;utility</td>
<td class="xl64" width="66">Config db</td>
<td class="xl64" width="124">Backed up&nbsp;with config, on<br />&nbsp; farm and web app&nbsp;levels</td>
<td class="xl64" width="167">No built-in UI, have to&nbsp;create your own management tool</td>
<td class="xl64" width="127">Yes</td>
</tr>
</tbody>
</table>
<p>For storing configuration data for SharePoint solutions, I would like to recommend use either property bags or hierarchical object store, maybe together with SharePoint lists depends on the amount of data you are dealing with. Some people may argue that they do not have built-in UI, actually it&nbsp;could be&nbsp;a good thing in this case, because that means they are not likely to be altered by accident, and it is easier to control access.</p>
<p>Below are some useful links on property bags, hierarchical object store, and application pages:</p>
<ul>
<li>Property bag:</li>
<ul>
<li><a href="https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sppropertybag.aspx">https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sppropertybag.aspx</a></li>
<li><a href="https://pbs2010.codeplex.com/">https://pbs2010.codeplex.com/</a></li>
</ul>
<li>Hierarchical object store:</li>
<ul>
<li><a href="https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.sppersistedobject.aspx">https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.sppersistedobject.aspx</a></li>
<li><a href="https://www.chaholl.com/archive/2011/01/30/the-skinny-on-sppersistedobject-and-the-hierarchical-object-store-in.aspx">https://www.chaholl.com/archive/2011/01/30/the-skinny-on-sppersistedobject-and-the-hierarchical-object-store-in.aspx</a></li>
</ul>
<li>Application page:</li>
<ul>
<li><a href="https://msdn.microsoft.com/en-us/library/ee231581.aspx">https://msdn.microsoft.com/en-us/library/ee231581.aspx</a></li>
</ul>
</ul>
<p>What about farm level SharePoint solutions? For example one of my customers developed a solution to support their enterprise search, some other customers developed timer jobs. Those solutions are not deployed for a specific site, site collection or a web application. Where should they store the configuration data?</p>
<p>The answer is to store the data in property bag in Central Admin or hierarchical object store, and deploy your application pages to CA. Here is an article about how to do it:&nbsp;</p>
<ul>
<li>Get CA's URL: <a href="https://www.sytone.com/2010/07/getting-the-central-admin-url-for-a-farm-in-sharepoint/">https://www.sytone.com/2010/07/getting-the-central-admin-url-for-a-farm-in-sharepoint/</a></li>
<li>Deploy an app page to CA:&nbsp;<a href="https://msdn.microsoft.com/en-us/library/ff798467.aspx">https://msdn.microsoft.com/en-us/library/ff798467.aspx</a></li>
</ul>
<p>Zewei Song, Ph.D.<br />Microsoft Certified Master: SharePoint 2010<br />Microsoft Consulting Services</p>]]></content:encoded>
    </item>
    <item>
      <title>Dr. Z is Master Z now!</title>
      <link>https://docs.microsoft.com/archive/blogs/zwsong/dr-z-is-master-z-now</link>
      <pubDate>Sun, 25 Mar 2012 17:23:00 GMT</pubDate>
      <dc:creator><![CDATA[Dr. Z]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/zwsong/2012/03/25/dr-z-is-master-z-now/</guid>
      <description><![CDATA[I officially became a Microsoft Certified Master for SharePoint Server 2010 on March 22,...]]></description>
      <content:encoded><![CDATA[<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/22/86/7563.MCM(rgb)_1406.gif" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-22-86/7563.MCM_2800_rgb_29005F00_1406.gif"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/22/86/7563.MCM(rgb)_1406.gif" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-22-86/7563.MCM_2800_rgb_29005F00_1406.gif" /></a></p>
<p>I officially became a Microsoft Certified Master for SharePoint Server 2010 on March 22, 2012.</p>
<p>The journey began more than a year early. If you read my earlier blog (<a href="https://blogs.msdn.com/b/zwsong/archive/2011/02/24/passed-all-4-sharepoint-2010-mcp-exams-at-techready.aspx">https://blogs.msdn.com/zwsong/archive/2011/02/24/passed-all-4-sharepoint-2010-mcp-exams-at-techready.aspx</a>), you would know that I passed all 4 MCP exams for SharePoint 2010 in February 2011, and that was the hard pre-requisition for being accepted by MCM program.</p>
<p>Around April and May 2011, I started to consider if I wanted to pursue a MCM certificate. An MCM or Master title not only is the second highest Microsoft certificate (there is a higher MCA title for enterprise architects), but also highly respected by the whole industry.</p>
<p>However, MCM is not easy, actually it is very hard, time consuming and expensive to achieve. Not only do you have to spend large amount of time to prepare and take very intense trainings and exams, but also would cost more than $25,000, and significant billable hours (I am a consultant).</p>
<p>Fortunately, my manager was very supportive and was willing to spend the big amount of money for MCM on me. (Microsoft employees get less than 50% discount on MCM training and exam fees). So, like a fool, I decided to go down the route.</p>
<p>Here is a list of major events&nbsp;of my entire MCM experience:</p>
<ol>
<li>Pass all SharePoint 2010 MCP exams (Feb. 2011)</li>
<li>Apply for MCM: online application with $250 fee (May 2011)</li>
<li>Submit resume and a write-up about my SharePoint projects (May 2011)</li>
<li>Telephone interviewed by MCM program manager and a SharePoint Master (July 2011)</li>
<li>Being accepted by MCM program and pick up a training rotation (July 2011)</li>
<li>Pay the&nbsp;MCM program&nbsp;fee ($25,000&nbsp;minus discount) (July 2011)</li>
<li>Prepare for the rotation (July &ndash; early September 2011)</li>
<li>Attend the on-site 3-week MCM training rotation in Redmond, WA (September 2011)</li>
<li>Pass knowledge exam (September 2011)</li>
<li>Fail Hands-on Qualification Lab (September 2011)</li>
<li>Prepare for QualLab retake (October 2011 &ndash; March 2012)</li>
<li>Pick a&nbsp;slot for QualLab retake (February 2012)</li>
<li>Pay QualLab retake fee ($2,500 minus Microsoft discount) (February 2012)</li>
<li>Take the QualLab retake (March 20, 2012)</li>
<li>Pass the retake and officially become a MCM (March 22, 2012)</li>
</ol>
<p>As you can see, it has been a very intense year for me and my team has spent a lot of money and lost quite some&nbsp;billable hours on it. And frankly speaking, I still couldn't believe I am a Master now. I still couldn't believe that my name will be listed&nbsp;with the world's&nbsp;best SharePoint gurus whom I look up to.</p>
<p>My many&nbsp;thanks go to my manager, MCM program managers, MCM instructorsm, my classmates at the rotation, and especially my wife and kids, they suffered when I was away preparing and going on training, they comforted me when I did not pass all the exams at first try, they supported my efforts and rejoiced when it&nbsp;had finally come.</p>
<p>Here are some links for&nbsp;the MCM program&nbsp;if you want to learn more&nbsp;about it:</p>
<ul>
<li>MCM Overview: <a href="https://www.microsoft.com/learning/en/us/certification/master.aspx">https://www.microsoft.com/learning/en/us/certification/master.aspx</a></li>
<li>MCMs and MCAs List: <a href="https://www.microsoft.com/learning/en/us/certification/master.aspx#meet">https://www.microsoft.com/learning/en/us/certification/master.aspx#meet</a></li>
<li>Master Blog: <a href="https://blogs.technet.com/themasterblog/">https://blogs.technet.com/themasterblog/</a></li>
</ul>
<p>Zewei Song, Ph.D.<br />Microsoft Certified Master: SharePoint Server 2010<br />Microsoft Consulting Services</p>]]></content:encoded>
    </item>
    <item>
      <title>Set-MsolAdfscontext Authentication Error</title>
      <link>https://docs.microsoft.com/archive/blogs/zwsong/set-msoladfscontext-authentication-error</link>
      <pubDate>Wed, 08 Jun 2011 13:00:38 GMT</pubDate>
      <dc:creator><![CDATA[Dr. Z]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/zwsong/2011/06/08/set-msoladfscontext-authentication-error/</guid>
      <description><![CDATA[You are setting up Office 365 ADFS/SSO, you are connected to your Office 365 tenant with Microsoft...]]></description>
      <content:encoded><![CDATA[<p>You are setting up Office 365 ADFS/SSO, you are connected to your Office 365 tenant with Microsoft Online Services Module for Windows PowerShell, you are trying to run Set-MsolAdfscontext -Computer &lt;ADFS server FQDN&gt; but keep getting prompted for your Windows credential and eventually receive an authentication error, you make sure that the Windows AD account you use has all the permissions and the ADFS server's FQDN is correct and there is no network issues between your server and the ADFS server, but it just would not let you to set the MSOnline ADFS context.</p>
<p>Turns out the fix is very simple: Run "<span style="background-color: #ffff00;">Enable-PSRemoting -Force</span>"cmdlet before your Set-MsolAdfscontext cmdlet.</p>
<p>This is what you do to set up an Office 365 SSO domain:</p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;">$cred=Get-Credential</span><br /><span style="font-family: courier new,courier;">Connect-MsolService -Credential $cred</span><br /><span style="font-family: courier new,courier;">Enable-PSRemoting -Force</span><br /><span style="font-family: courier new,courier;">Set-MsolAdfscontext -Computer &lt;ADFS server FQDN&gt;</span><br /><span style="font-family: courier new,courier;">New-MsolFederatedDomain -DomainName &lt;Domain FQDN&gt;</span></p>
<p>Enjoy Office 365!</p>
<p>Zewei Song, Ph.D.<br />MCPD, MCITP, MCTS: SharePoint 2010, .NET 3.5<br />Enterprise Services, Microsoft Corporation</p>
<p>This is what you would see in log file for this error:</p>
<p style="padding-left: 30px;"><i>6/6/2011 2:46:42 PM Command Set-</i><i>MsolADFSContext</i><i> invoked.</i><br /><em>6/6/2011 2:46:42 PM Creating ADFS Server PS session.</em><br /><i>6/6/2011 2:46:42 PM </i><i>ContextCredentialsCommand</i><i>:</i><i>CreatePowerShellSessionToGenevaServer</i><i>: Invoked.</i><br /><i>6/6/2011 2:46:42 PM Creating PS session to '</i><i>adfsServer</i><i>.</i><i>contoso</i><i>.com' ADFS server</i><br /><i>6/6/2011 2:46:42 PM Connect using current logged-on user </i><i>creds</i><i>.</i><br /><i>6/6/2011 2:46:42 PM </i><i>Runspace</i><i> Connection info: Scheme:http Port:5985, </i><i>AuthenticationType</i><i>:Default Uri:</i><i>adfsServer</i><i>.</i><i>contoso</i><i>.com </i><i>AppName</i><i>:</i><i>wsman</i><i>, Shell:https://</i><i>schemas</i><i>.</i><i>microsoft</i><i>.com/</i><i>powershell</i><i>/Microsoft.</i><i>PowerShell</i><br /><em>6/6/2011 2:46:42 PM Connection Uri: <a href="https://adfsserver.contoso.com:5985/wsman/">https://adfsServer.contoso.com:5985/wsman/</a></em><br /><i>6/6/2011 2:46:42 PM Opening </i><i>runspace</i><i> to 'https://</i><i>adfsServer</i><i>.</i><i>contoso</i><i>.com:5985/</i><i>wsman</i><i>/'</i><br /><i>6/6/2011 2:46:45 PM System.Management.Automation.</i><i>Remoting</i><i>.</i><i>PSRemotingTransportException</i><i>: Connecting to remote server failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or </i><i>WinRM</i><i>. If the destination is the </i><i>WinRM</i><i> service, run the following command on the destination to analyze and configure the </i><i>WinRM</i><i> service: "</i><i>winrm</i><i> </i><i>quickconfig</i><i>". For more information, see the about_Remote_Troubleshooting Help topic.</i><br /><em>at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()</em><br /><i>at System.Management.Automation.</i><i>Runspaces</i><i>.Internal.</i><i>RunspacePoolInternal</i><i>.</i><i>EndOpen</i><i>(</i><i>IAsyncResult</i><i> </i><i>asyncResult</i><i>)</i><br /><em>at System.Management.Automation.Runspaces.RunspacePool.Open()</em><br /><i>at Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>PowerShellSession</i><i>.</i><i>VerifyAndReconnectRunSpacePool</i><i>()</i><br /><i>6/6/2011 2:46:45 PM </i><i>fullyQualifiedErrorId</i><i>: System.Management.Automation.</i><i>Remoting</i><i>.</i><i>PSRemotingDataStructureException</i><br /><i>6/6/2011 2:46:45 PM Command failed: Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>IdentityFederationException</i><i>: Connecting to remote server failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or </i><i>WinRM</i><i>. If the destination is the </i><i>WinRM</i><i> service, run the following command on the destination to analyze and configure the </i><i>WinRM</i><i> service: "</i><i>winrm</i><i> </i><i>quickconfig</i><i>". For more information, see the about_Remote_Troubleshooting Help topic.</i><br /><i>at Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>PowerShellSession</i><i>.</i><i>ParseAndThrowErrorRecord</i><i>(</i><i>ErrorRecord</i><i> </i><i>errorRecord</i><i>, String </i><i>overRideErrorId</i><i>)</i><br /><em>at Microsoft.Online.Identity.Federation.Powershell.PowerShellSession.VerifyAndReconnectRunSpacePool()</em><br /><i>at Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>ContextCredentialsCommand</i><i>.</i><i>OpenToGenevaServer</i><i>(</i><i>PSCredential</i><i> </i><i>serverCredential</i><i>)</i><br /><i>at Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>ContextCredentialsCommand</i><i>.&lt;&gt;c__DisplayClass2.&lt;</i><i>CreatePowerShellSessionToGenevaServer</i><i>&gt;b__0()</i><br /><i>at Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.Utility.</i><i>InvokeOperationWithRetry</i><i>(Action operation, Type </i><i>exceptionType</i><i>, String </i><i>errorId</i><i>, Int32 </i><i>retryCount</i><i>, Int32 </i><i>retryWaitTimeInMilliseconds</i><i>)</i><br /><i>6/6/2011 2:46:45 PM Retry </i><i>errorId</i><i>: </i><i>ConnectionToGenevaServerFailed</i><br /><i>6/6/2011 2:46:45 PM Retry exception: Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>IdentityFederationException</i><br /><em>6/6/2011 2:46:45 PM Going to sleep mode for 1000 milliseconds before reattempt - 2</em><br /><i>6/6/2011 2:46:46 PM </i><i>Runspace</i><i> Connection info: Scheme:http Port:5985, </i><i>AuthenticationType</i><i>:Default Uri:</i><i>adfsServer</i><i>.</i><i>contoso</i><i>.com </i><i>AppName</i><i>:</i><i>wsman</i><i>, Shell:https://</i><i>schemas</i><i>.</i><i>microsoft</i><i>.com/</i><i>powershell</i><i>/Microsoft.</i><i>PowerShell</i><br /><em>6/6/2011 2:46:46 PM Connection Uri: <a href="https://adfsserver.contoso.com:5985/wsman/">https://adfsServer.contoso.com:5985/wsman/</a></em><br /><i>6/6/2011 2:46:46 PM Opening </i><i>runspace</i><i> to 'https://</i><i>adfsServer</i><i>.</i><i>contoso</i><i>.com:5985/</i><i>wsman</i><i>/'</i><br /><i>6/6/2011 2:46:49 PM System.Management.Automation.</i><i>Remoting</i><i>.</i><i>PSRemotingTransportException</i><i>: Connecting to remote server failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or </i><i>WinRM</i><i>. If the destination is the </i><i>WinRM</i><i> service, run the following command on the destination to analyze and configure the </i><i>WinRM</i><i> service: "</i><i>winrm</i><i> </i><i>quickconfig</i><i>". For more information, see the about_Remote_Troubleshooting Help topic.</i><br /><em>at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()</em><br /><i>at System.Management.Automation.</i><i>Runspaces</i><i>.Internal.</i><i>RunspacePoolInternal</i><i>.</i><i>EndOpen</i><i>(</i><i>IAsyncResult</i><i> </i><i>asyncResult</i><i>)</i><br /><em>at System.Management.Automation.Runspaces.RunspacePool.Open()</em><br /><i>at Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>PowerShellSession</i><i>.</i><i>VerifyAndReconnectRunSpacePool</i><i>()</i><br /><i>6/6/2011 2:46:49 PM </i><i>fullyQualifiedErrorId</i><i>: System.Management.Automation.</i><i>Remoting</i><i>.</i><i>PSRemotingDataStructureException</i><br /><i>6/6/2011 2:46:49 PM Command failed: Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>IdentityFederationException</i><i>: Connecting to remote server failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or </i><i>WinRM</i><i>. If the destination is the </i><i>WinRM</i><i> service, run the following command on the destination to analyze and configure the </i><i>WinRM</i><i> service: "</i><i>winrm</i><i> </i><i>quickconfig</i><i>". For more information, see the about_Remote_Troubleshooting Help topic.</i><br /><i>at Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>PowerShellSession</i><i>.</i><i>ParseAndThrowErrorRecord</i><i>(</i><i>ErrorRecord</i><i> </i><i>errorRecord</i><i>, String </i><i>overRideErrorId</i><i>)</i><br /><em>at Microsoft.Online.Identity.Federation.Powershell.PowerShellSession.VerifyAndReconnectRunSpacePool()</em><br /><i>at Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>ContextCredentialsCommand</i><i>.</i><i>OpenToGenevaServer</i><i>(</i><i>PSCredential</i><i> </i><i>serverCredential</i><i>)</i><br /><i>at Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>ContextCredentialsCommand</i><i>.&lt;&gt;c__DisplayClass2.&lt;</i><i>CreatePowerShellSessionToGenevaServer</i><i>&gt;b__0()</i><br /><i>at Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.Utility.</i><i>InvokeOperationWithRetry</i><i>(Action operation, Type </i><i>exceptionType</i><i>, String </i><i>errorId</i><i>, Int32 </i><i>retryCount</i><i>, Int32 </i><i>retryWaitTimeInMilliseconds</i><i>)</i><br /><i>6/6/2011 2:46:49 PM Retry </i><i>errorId</i><i>: </i><i>ConnectionToGenevaServerFailed</i><br /><i>6/6/2011 2:46:49 PM Retry exception: Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>IdentityFederationException</i><br /><em>6/6/2011 2:46:49 PM Going to sleep mode for 2000 milliseconds before reattempt - 3</em><br /><i>6/6/2011 2:46:51 PM </i><i>Runspace</i><i> Connection info: Scheme:http Port:5985, </i><i>AuthenticationType</i><i>:Default Uri:</i><i>adfsServer</i><i>.</i><i>contoso</i><i>.com </i><i>AppName</i><i>:</i><i>wsman</i><i>, Shell:https://</i><i>schemas</i><i>.</i><i>microsoft</i><i>.com/</i><i>powershell</i><i>/Microsoft.</i><i>PowerShell</i><br /><em>6/6/2011 2:46:51 PM Connection Uri: <a href="https://adfsserver.contoso.com:5985/wsman/">https://adfsServer.contoso.com:5985/wsman/</a></em><br /><i>6/6/2011 2:46:51 PM Opening </i><i>runspace</i><i> to 'https://</i><i>adfsServer</i><i>.</i><i>contoso</i><i>.com:5985/</i><i>wsman</i><i>/'</i><br /><i>6/6/2011 2:46:54 PM System.Management.Automation.</i><i>Remoting</i><i>.</i><i>PSRemotingTransportException</i><i>: Connecting to remote server failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or </i><i>WinRM</i><i>. If the destination is the </i><i>WinRM</i><i> service, run the following command on the destination to analyze and configure the </i><i>WinRM</i><i> service: "</i><i>winrm</i><i> </i><i>quickconfig</i><i>". For more information, see the about_Remote_Troubleshooting Help topic.</i><br /><em>at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()</em><br /><i>at System.Management.Automation.</i><i>Runspaces</i><i>.Internal.</i><i>RunspacePoolInternal</i><i>.</i><i>EndOpen</i><i>(</i><i>IAsyncResult</i><i> </i><i>asyncResult</i><i>)</i><br /><em>at System.Management.Automation.Runspaces.RunspacePool.Open()</em><br /><i>at Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>PowerShellSession</i><i>.</i><i>VerifyAndReconnectRunSpacePool</i><i>()</i><br /><i>6/6/2011 2:46:54 PM </i><i>fullyQualifiedErrorId</i><i>: System.Management.Automation.</i><i>Remoting</i><i>.</i><i>PSRemotingDataStructureException</i><br /><i>6/6/2011 2:46:54 PM Command failed: Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>IdentityFederationException</i><i>: Connecting to remote server failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or </i><i>WinRM</i><i>. If the destination is the </i><i>WinRM</i><i> service, run the following command on the destination to analyze and configure the </i><i>WinRM</i><i> service: "</i><i>winrm</i><i> </i><i>quickconfig</i><i>". For more information, see the about_Remote_Troubleshooting Help topic.</i><br /><i>at Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>PowerShellSession</i><i>.</i><i>ParseAndThrowErrorRecord</i><i>(</i><i>ErrorRecord</i><i> </i><i>errorRecord</i><i>, String </i><i>overRideErrorId</i><i>)</i><br /><em>at Microsoft.Online.Identity.Federation.Powershell.PowerShellSession.VerifyAndReconnectRunSpacePool()</em><br /><i>at Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>ContextCredentialsCommand</i><i>.</i><i>OpenToGenevaServer</i><i>(</i><i>PSCredential</i><i> </i><i>serverCredential</i><i>)</i><br /><i>at Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>ContextCredentialsCommand</i><i>.&lt;&gt;c__DisplayClass2.&lt;</i><i>CreatePowerShellSessionToGenevaServer</i><i>&gt;b__0()</i><br /><i>at Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.Utility.</i><i>InvokeOperationWithRetry</i><i>(Action operation, Type </i><i>exceptionType</i><i>, String </i><i>errorId</i><i>, Int32 </i><i>retryCount</i><i>, Int32 </i><i>retryWaitTimeInMilliseconds</i><i>)</i><br /><i>6/6/2011 2:46:54 PM Retry </i><i>errorId</i><i>: </i><i>ConnectionToGenevaServerFailed</i><br /><i>6/6/2011 2:46:54 PM Retry exception: Microsoft.Online.Identity.Federation.</i><i>Powershell</i><i>.</i><i>IdentityFederationException</i><br /><em>6/6/2011 2:46:54 PM Failure after too many retries attempts..</em><br /><em>6/6/2011 2:46:54 PM Wrong credentials to ADFS Server connection, attempt #'1'</em><br /><i>6/6/2011 2:46:54 PM Prompting the user for '</i><i>adfsServer</i><i>.</i><i>contoso</i><i>.com' ADFS Server </i><i>creds</i><i>.</i><br /><em>6/6/2011 2:46:54 PM ContextCredentialsCommand:GetServerCredentials: Invoked.</em></p>]]></content:encoded>
    </item>
    <item>
      <title>Killing two birds with one stone: SharePoint HA and DR with stretch farm, and everything you want to know about it</title>
      <link>https://docs.microsoft.com/archive/blogs/zwsong/killing-two-birds-with-one-stone-sharepoint-ha-and-dr-with-stretch-farm-and-everything-you-want-to-know-about-it</link>
      <pubDate>Mon, 04 Apr 2011 10:10:00 GMT</pubDate>
      <dc:creator><![CDATA[Dr. Z]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/zwsong/2011/04/04/killing-two-birds-with-one-stone-sharepoint-ha-and-dr-with-stretch-farm-and-everything-you-want-to-know-about-it/</guid>
      <description><![CDATA[A single SharePoint farm running&nbsp;across multiple data centers is called a &ldquo;stretch...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: x-small;"><span style="font-size: small;">A single SharePoint farm running&nbsp;across multiple data centers is called a &ldquo;stretch farm&rdquo;. </span></span><span style="font-size: x-small;"><span style="font-size: small;">Using a stretched SharePoint farm, you can provide fault tolerance by following the standard guidance for making databases and service applications redundant. Therefore you can achieve high availability and disaster recovery at the same time.</span></span></p>
<p><span style="font-size: small;">You can follow this articles to set up a stretch farm using SQL mirroring: <a href="https://technet.microsoft.com/en-us/library/dd207314.aspx">https://technet.microsoft.com/en-us/library/dd207314.aspx</a></span></p>
<p style="text-align: center;"><span style="font-size: small;"><img src="https://i.technet.microsoft.com/cc748824.79a94f30-3620-403c-b57a-9564f99aff84(en-us,Office.14).gif" border="0" style="max-width: 550px;" /></span></p>
<p><span style="font-size: small;">Following&nbsp;Q&amp;As&nbsp;are based on my real-world experiences with SQL mirror and SharePoint&nbsp;stretch farm.&nbsp;</span></p>
<p><strong><span style="font-size: small;">Questions and Answers (DC stands for Data Center):</span></strong>&nbsp;</p>
<ul>
<li><span style="font-size: small;"><strong>What are the requirements for setting up a SharePoint stretch farm?<br /></strong>For a stretched farm to work, there must be less than 1 millisecond latency between all the SQL Servers and the front-end Web servers in one direction, and at least 1 gigabit per second bandwidth.<o:p></o:p></span></li>
<li><span style="font-size: small;"><strong>Where to put the witness server?<br /></strong>Put the witness server in the most reliable DC. If the&nbsp;secondary DC is more reliable and the connection between the DCs&nbsp;is at least as reliable as the DCs, you can put the witness in the secondary DC, otherwise, it should be in the primary&nbsp;DC.&nbsp;</span></li>
<li><span style="font-size: small;"></span><span style="font-size: small;"><span style="font-size: small;"><strong>What is the minimum firewall requirements for the&nbsp;witness server?<br /></strong>Open up the&nbsp;TCP port of the SQL mirroring endpoint for inbound traffic.&nbsp;</span></span></li>
<li><span style="font-size: small;"><strong>Can I use SQL Express&nbsp;as the witness?</strong><br />Yes, you can.</span></li>
<li><span style="font-size: small;"><strong>How to test a stretch farm?<br /></strong>You can simulate a failed SQL server by stopping its service using SQL Management Studio. Open the studio, connect to the SQL instance and right click on the instance name on the left pane and select Stop command. If the SQL instance is the principal,&nbsp;the mirror SQL instace will&nbsp;take over the principal role and the&nbsp;SharePoint farm&nbsp;will come back to service within a few seconds.</span></li>
<li><span style="font-size: small;"><strong>How to manually failover from one DC to another DC?<br /></strong>Run following T-SQL command on the principal SQL server instance. You need to run the command for each database.<br /></span>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: 'Courier New'; color: blue; mso-no-proof: yes;">ALTER</span><span style="font-family: 'Courier New'; mso-no-proof: yes;"> <span style="color: blue;">DATABASE</span>&nbsp;&lt;your database name&gt; <span style="color: blue;">SET</span> <span style="color: blue;">PARTNER</span> <span style="color: blue;">FAILOVER<o:p></o:p></span></span></span></p>
</li>
<li><span style="font-size: small;"><strong>What to do when&nbsp;I lose the primary DC?</strong><br />When you have the witness server in primary DC and the whole DC is gone (disaster happens), the mirror SQL instance will become "Principal - In Recovery" but won't serve data. To bring it back online so your SharePoint services resume, you need to run following T-SQL commands. You have to do it for all of your databases.<br /></span>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: 'Courier New'; color: blue; mso-no-proof: yes;">ALTER</span><span style="font-family: 'Courier New'; mso-no-proof: yes;"> <span style="color: blue;">DATABASE</span>&nbsp;&lt;your database name&gt; <span style="color: blue;">SET</span> <span style="color: blue;">PARTNER</span> <span style="color: blue;">OFF<o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: 'Courier New'; color: blue; mso-no-proof: yes;">RESTORE</span><span style="font-family: 'Courier New'; mso-no-proof: yes;"> <span style="color: blue;">DATABASE</span> &lt;your database name&gt; <span style="color: blue;">WITH</span> <span style="color: blue;">RECOVERY<o:p></o:p></span></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="line-height: 115%; font-family: 'Courier New'; mso-no-proof: yes;"><span style="mso-spacerun: yes;"><span style="font-family: Arial;">Above commands&nbsp;break the mirroring partnership. You have to&nbsp;backup/restore the databases and&nbsp;resume the partnership after the primary DC is recovered.<br />If the witness server is in the secondary DC, the mirror SQL instance will automatically become the principal server, your SharePoint farm will resume services in a few seconds.</span></span></span></span></p>
</li>
<li>
<p class="MsoNormal"><span style="font-size: small;"><span style="line-height: 115%; font-family: 'Courier New'; mso-no-proof: yes;"><span style="mso-spacerun: yes;"><span style="font-family: Arial;"></span></span></span></span><span style="font-size: small;"><strong>What to do when the primary DC is recovered after a disaster?</strong>&nbsp;<br />Assume you already ran the commands to break the mirror partnership. You have to follow the steps to resume it. Note the principal SQL&nbsp;instance is in the secondary DC at this point:<br />&nbsp; 1.&nbsp;On the principal server, back up all SharePoint databases.<br />&nbsp; 2.&nbsp;Copy the backup files to the mirror database server. The server should be running on stand-alone mode.<br />&nbsp; 3.&nbsp;Delete all the SharePoint databases from the mirror database server if they are still present <br />&nbsp; 4.&nbsp;Restore the databases to the mirror server.<br />&nbsp; 5.&nbsp;On the mirror server, set up the mirroring partnership.<br />&nbsp; 6.&nbsp;On the principal server, set up the mirroring partnership.<br />&nbsp; 7.&nbsp;On the principal server, set up the witness partnership.<br />&nbsp; 8.&nbsp;Test SharePoint and make sure it is still functioning.<br />&nbsp; 9.&nbsp;Failover to the original principal server if necessary.<br />If the SQL instance in the secondary DC automatically took over the principal role, you don't have to do anything but just&nbsp;give&nbsp;them some time to sync up.</span></p>
</li>
<li><span style="font-size: small;"><strong>What happens if I lose connection between the primary and the secondary data centers?</strong><br />Assume both the DCs are still working but the connection between them is broken. Both the SQL instances will become principal. The one with access to the witness server will be serving data, the one without access to the witness will stop serving data&nbsp;and the SharePoint servers in that DC will stop working.</span></li>
<li><span style="font-size: small;"><strong>Can SQL mirroring work with cluster?</strong><br />Mirroring can work between SQL clusters, and a SQL cluster and a single server SQL instance. Mirroring, however,&nbsp;does not work within a SQL cluster.</span></li>
<li><span style="font-size: small;"><strong>What happens&nbsp;when my principal cluster fails over?</strong><br />SQL cluster failover always takes longer time&nbsp;than SQL mirroring witness interval. Therefore, SQL mirroring roles will be switched when the principal cluster fails over. You can failover back to the original cluster after SQL cluster failover is complete.</span></li>
<li><span style="font-size: small;"><strong>Does stretch farm affect SharePoint performance?</strong><br />According to my limited performance tests, no.</span></li>
<li><span style="font-size: small;"><strong>How do I set up failover for SharePoint features that do not have UI to set up failover instances?<br /></strong>You can run following PowerShell commands in SharePoint PowerShell console on a SharePoint server:<br /></span>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Consolas; color: blue; mso-fareast-font-family: 'Times New Roman';">$db</span><span style="font-family: Consolas; color: black; mso-fareast-font-family: 'Times New Roman';">&nbsp;</span><span style="font-family: Consolas; color: gray; mso-fareast-font-family: 'Times New Roman';">=</span><span style="font-family: Consolas; color: black; mso-fareast-font-family: 'Times New Roman';">&nbsp;</span><span style="font-family: Consolas; color: blue; mso-fareast-font-family: 'Times New Roman';">get</span><span style="font-family: Consolas; color: gray; mso-fareast-font-family: 'Times New Roman';">-</span><span style="font-family: Consolas; color: teal; mso-fareast-font-family: 'Times New Roman';">spdatabase</span><span style="font-family: Consolas; color: black; mso-fareast-font-family: 'Times New Roman';">&nbsp;</span><span style="font-family: Consolas; color: gray; mso-fareast-font-family: 'Times New Roman';">|</span><span style="font-family: Consolas; color: black; mso-fareast-font-family: 'Times New Roman';">&nbsp;</span><span style="font-family: Consolas; color: blue; mso-fareast-font-family: 'Times New Roman';">where</span><span style="font-family: Consolas; color: black; mso-fareast-font-family: 'Times New Roman';">&nbsp;</span><span style="font-family: Consolas; color: gray; mso-fareast-font-family: 'Times New Roman';">{</span><span style="font-family: Consolas; color: blue; mso-fareast-font-family: 'Times New Roman';">$_</span><span style="font-family: Consolas; color: gray; mso-fareast-font-family: 'Times New Roman';">.</span><span style="font-family: Consolas; color: teal; mso-fareast-font-family: 'Times New Roman';">Name</span><span style="font-family: Consolas; color: black; mso-fareast-font-family: 'Times New Roman';">&nbsp;</span><span style="font-family: Consolas; color: gray; mso-fareast-font-family: 'Times New Roman';">-</span><span style="font-family: Consolas; color: teal; mso-fareast-font-family: 'Times New Roman';">eq</span><span style="font-family: Consolas; color: black; mso-fareast-font-family: 'Times New Roman';">&nbsp;</span><span style="font-family: Consolas; color: teal; mso-fareast-font-family: 'Times New Roman';">"&lt;database name&gt;"</span><span style="font-family: Consolas; color: gray; mso-fareast-font-family: 'Times New Roman';">}</span><span style="font-family: Consolas; color: black; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Consolas; color: blue; mso-fareast-font-family: 'Times New Roman';">$db</span><span style="font-family: Consolas; color: gray; mso-fareast-font-family: 'Times New Roman';">.</span><span style="font-family: Consolas; color: teal; mso-fareast-font-family: 'Times New Roman';">AddFailoverServiceInstance</span><span style="font-family: Consolas; color: gray; mso-fareast-font-family: 'Times New Roman';">(</span><span style="font-family: Consolas; color: teal; mso-fareast-font-family: 'Times New Roman';">"&lt;failover SQL instance name&gt;"</span><span style="font-family: Consolas; color: gray; mso-fareast-font-family: 'Times New Roman';">)</span><span style="font-family: Consolas; color: black; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size: small;"><span style="font-family: Consolas; color: blue; mso-fareast-font-family: 'Times New Roman';">$db</span><span style="font-family: Consolas; color: gray; mso-fareast-font-family: 'Times New Roman';">.</span><span style="font-family: Consolas; color: blue; mso-fareast-font-family: 'Times New Roman';">Update</span><span style="font-family: Consolas; color: gray; mso-fareast-font-family: 'Times New Roman';">()</span><span style="font-family: Consolas; color: black; mso-fareast-font-family: 'Times New Roman';"><o:p></o:p></span></span></p>
</li>
<li><span style="font-size: small;"><strong>Does stretch farm protects all SharePoint functionalities?</strong><br />No. It does not&nbsp;protect functionalities with dependencies beyond 14-hive and databases. Some examples of the not supported dependencies are file shares, and external data sources.&nbsp;Some 3rd party SharePoint solution without failover capabilities will also not be protected. Contact your vendors for more information.</span></li>
</ul>
<p><span style="font-size: small;"></span></p>
<p><span style="font-size: small;">Zewei Song, Ph.D.<br />MCPD, MCITP, MCTS: SharePoint 2010, .NET 3.5<br />Enterprise Services, Microsoft Corporation</span></p>]]></content:encoded>
    </item>
  </channel>
</rss>