SharePoint Experts, Information Architects, Expert Witness

We provide consulting in a broad array of business and technology from architecture to design to deployment of global systems with a focus on surfacing data in the enterprise. Specialists in Microsoft, we are a premier provider of SharePoint Expertise (including 2016 and Office 365). We also provide Expert Witness/Legal Expert in eDiscovery, source discovery, patent infringement, piracy and more! We also have established SICG DLDS s.a. - our counterpart in Costa Rica that specializes in water systems (http://www.crwatersolutions.com) - Contact me direct: david_sterling@sterling-consulting.com or call 704-873-8846 x704.

Search This Blog

Tuesday, December 24, 2013

Setting Distributed Cache Service Managed Account in SharePoint 2013

As many of you are aware, the Distributed Cache Service is a new feature for SharePoint 2013. In effect, this service is used primarily by the App Fabric service.

Once again, the Global Development Center gets it half right - while adding this service to SharePoint, they once again opt for a Powershell solution over enabling the setting like every other service.

For most, this will appear when a warning shows up in the Health Analyzer - by default, this service will be assigned to the Farm Account (hopefully) or if you followed the misguided method of using an Installation Account. Regardless, this account should be set to whatever you are using as a standard services account.

The following Powershell enables you to set this account (remember to start Powershell using 'Run as administrator'). Note that the -Identity set on the third line should be the service account to assign (note that the domain name must be specified AND verify that this account has 'Run as a service' rights!):

$farmRef = Get-SPFarm
$dCacheService = $farmRef.Services | where {$_.Name -eq "AppFabricCachingService"}
$acct = Get-SPManagedAccount -Identity sicgtmp\SPServiceAcct
$dCacheService.ProcessIdentity.CurrentIdentityType = "SpecificUser"
$dCacheService.ProcessIdentity.ManagedAccount = $acct
$dCacheService.ProcessIdentity.Update() 
$dCacheService.ProcessIdentity.Deploy()

Be aware that when the .Deploy() command is executed be prepared to WAIT (and wait, and wait some more). This can take anywhere from a few minutes to 1/2 hour or more. Can't tell you why the delay nor why it varies so much.

For a quick reference on this, see the Technet article here:
       http://technet.microsoft.com/en-us/library/jj219613.aspx


Visual Studio Project Upgrade keeps popping up

I've seen a bunch of posts for this but hate having to search again when this occurs. The issue is simple: You open a Visual Studio 2010 in 2012 or 13 (or older project in 2015/2017) and the project prompts you to convert. Once done you'd think it's all set but no, when you close it and attempt to open the project again, it does another convert!

Since I hate searching for the fix myself when I forget what it was, here it is in all the glory:

   1) Open the project folder and locate the .csproj file

   2) Edit this in notepad and locate the FileUpgradeFlag tag - this will probably look something like this (note that the number may be different but 40 seems to be common):
                     <FileUpgradeFlags>40</FileUpgradeFlags>

   3) Simply remove the number here so that the line looks like:
                      <FileUpgradeFlags></FileUpgradeFlags>

   4) Save the file and close notepad (or whatever editor you used)

   5) Open the project again by using Visual Studio 'Run as administrator' and opening up the project using the Solution (.sln) file

Viola, project opens normally and does not prompt you to convert!


Sunday, December 15, 2013

Windows 2012 to Windows 2012 R2 - VMWare Workstation VMNet0 error

Discovered a problem while upgrading our VMWare Server from Windows 2012 to 2012 R2. On successfully updating, when starting up a Virtual Machine, got the error message that VMNet0 was missing. Once the VM booted, attempting to click 'Connect' on the network adapter in settings generated an error saying that the VMNet0 was not started.

Checking the VMWare settings (Edit > Virtual Network Editor...) I found that VMNet0 was indeed missing. Adding it proved a problem since it would not allow me to set it as Bridged (error that there were no non-bridged adapters available); in short, it was there, just not visible.

Did a bit of research and found some others had similar problems with Windows 8 to 8.1 - some recommended messing with the network adapter protocols (of which I do not recommend) but the best suggestion that worked overall was to simply re-load the installation media (or use the .exe if that's what you have) and run the VMWare Install Repair (you do not have to uninstall/reinstall). After the repair is complete, do a reboot of the server.

When the server has started up completely, open the VMWare console and check the network (Edit > Virtual Network Editor...) and VMNet0 (set as auto-bridged) should be displayed. Power up the VM and the network should appear as normal.

Saturday, November 30, 2013

Moving SharePoint IIS Sites Off of the System Drive

As you may be aware, SharePoint always installs sites on the C (system) drive by default. While this is fine for a development system, this is obviously not what is desired in a production environment.

There are multiple posts on how to do this but kudos to Jeremy Taylor - his post covers it all:

http://www.jeremytaylor.net/2012/04/10/moving-sharepoint-sites-off-the-system-drive-changing-iis-virtual-directories/

A few things to note about this:
  1. The Drives must match on ALL systems that will host IIS - this means the Web Front Ends (WFE's), the Application Servers and the Search Servers - the SAME drive letter must be used for all servers.
  2. Go ahead and follow the installation up to creating the Central Administration site.
  3. If this is a VM, take a SNAPSHOT BEFORE you do this!
  4. Run the command/batch script to move the IIS sites to a new drive - use the Command Prompt and select Run as administrator (NOTE: Moving IIS sites before or after the creation of Central Administration doesn't matter - the SharePoint install has the c: drive hardcoded and you can change it until after the fact).
  5. After IIS sites have been moved, use the PowerShell script to move Central Administration; open the SharePoint 2013 Command Shell and be sure to select Run as administrator.
  6. After running the PowerShell script, you MUST change the CA directory manually in IIS (see image below)
  7. Once this has been completed, be SURE to run an IISRESET (use the Command Prompt selecting Run as administrator)
  8. Verify that Central Administration is working,
  9. Run the Move IIS script on ALL other servers that will be hosting IIS.



Again note - if you are using Virtual Machines, perform a snaptshot before performing any of these steps!!

In case you have difficulty getting to the post, I've included the scripts here - remember that MOVE_IIS_ROOT.bat must be run on EVERY server hosting IIS and map to the SAME DRIVE!

To run both scripts, you MUST be sure that you use 'Run as administrator' - this is good habit for anything having to do with SharePoint 2013! 

Running the PowerShell script is only required on servers that will host Central Administration.

MOVE_IIS_ROOT.bat:

REM PLEASE BE AWARE: SERVICING (I.E. HOTFIXES AND SERVICE PACKS) WILL STILL
REM REPLACE FILES IN THE ORIGINAL DIRECTORIES. THE LIKELIHOOD THAT FILES
REM IN THE INETPUB DIRECTORIES HAVE TO BE REPLACED BY SERVICING IS LOW 
REM BUT FOR THIS REASON DELETING THE ORIGINAL DIRECTORIES (on C:)
REM IS NOT POSSIBLE. 

@echo off
IF "%1" == "" goto err
setlocal
set MOVETO=%1:\

REM simple error handling if drive does not exist or argument is wrong 
IF NOT EXIST %MOVETO% goto err

REM Backup IIS config before we start changing config to point to the new path
%windir%\system32\inetsrv\appcmd add backup beforeRootMove


REM Stop all IIS services
iisreset /stop

REM Copy all content 
REM /O - copy ACLs
REM /E - copy sub directories including empty ones
REM /I - assume destination is a directory
REM /Q - quiet

REM echo on, because user will be prompted if content already exists.
echo on
xcopy %systemdrive%\inetpub %MOVETO%inetpub /O /E /I /Q
@echo off
REM Move AppPool isolation directory 
reg add HKLM\System\CurrentControlSet\Services\WAS\Parameters /v ConfigIsolationPath /t REG_SZ /d %MOVETO%inetpub\temp\appPools /f

REM Move logfile directories
%windir%\system32\inetsrv\appcmd set config -section:system.applicationHost/sites -siteDefaults.traceFailedRequestsLogging.directory:"%MOVETO%inetpub\logs\FailedReqLogFiles"
%windir%\system32\inetsrv\appcmd set config -section:system.applicationHost/sites -siteDefaults.logfile.directory:"%MOVETO%inetpub\logs\logfiles"
%windir%\system32\inetsrv\appcmd set config -section:system.applicationHost/log -centralBinaryLogFile.directory:"%MOVETO%inetpub\logs\logfiles"
%windir%\system32\inetsrv\appcmd set config -section:system.applicationHost/log -centralW3CLogFile.directory:"%MOVETO%inetpub\logs\logfiles"

REM Move config history location, temporary files, the path for the Default Web Site and the custom error locations
%windir%\system32\inetsrv\appcmd set config -section:system.applicationhost/configHistory -path:%MOVETO%inetpub\history
%windir%\system32\inetsrv\appcmd set config -section:system.webServer/asp -cache.disktemplateCacheDirectory:"%MOVETO%inetpub\temp\ASP Compiled Templates"
%windir%\system32\inetsrv\appcmd set config -section:system.webServer/httpCompression -directory:"%MOVETO%inetpub\temp\IIS Temporary Compressed Files"
%windir%\system32\inetsrv\appcmd set vdir "Default Web Site/" -physicalPath:%MOVETO%inetpub\wwwroot
%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='401'].prefixLanguageFilePath:%MOVETO%inetpub\custerr
%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='403'].prefixLanguageFilePath:%MOVETO%inetpub\custerr
%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='404'].prefixLanguageFilePath:%MOVETO%inetpub\custerr
%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='405'].prefixLanguageFilePath:%MOVETO%inetpub\custerr
%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='406'].prefixLanguageFilePath:%MOVETO%inetpub\custerr
%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='412'].prefixLanguageFilePath:%MOVETO%inetpub\custerr
%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='500'].prefixLanguageFilePath:%MOVETO%inetpub\custerr
%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='501'].prefixLanguageFilePath:%MOVETO%inetpub\custerr
%windir%\system32\inetsrv\appcmd set config -section:httpErrors /[statusCode='502'].prefixLanguageFilePath:%MOVETO%inetpub\custerr

REM Make sure Service Pack and Hotfix Installers know where the IIS root directories are
reg add HKLM\Software\Microsoft\inetstp /v PathWWWRoot /t REG_SZ /d %mOVETO%inetpub\wwwroot /f 
reg add HKLM\Software\Microsoft\inetstp /v PathFTPRoot /t REG_SZ /d %MOVETO%inetpub\ftproot /f
REM Do the same for x64 directories
if not "%ProgramFiles(x86)%" == "" reg add HKLM\Software\Wow6432Node\Microsoft\inetstp /v PathWWWRoot /t REG_EXPAND_SZ /d %MOVETO%inetpub\wwwroot /f 
if not "%ProgramFiles(x86)%" == "" reg add HKLM\Software\Wow6432Node\Microsoft\inetstp /v PathFTPRoot /t REG_EXPAND_SZ /d %MOVETO%inetpub\ftproot /f

REM Restart all IIS services
iisreset /start
echo.
echo.
echo ===============================================================================
echo Moved IIS7 root directory from %systemdrive%\ to %MOVETO%.
echo.
echo Please verify if the move worked. If so you can delete the %systemdrive%\inetpub directory.
echo If something went wrong you can restore the old settings via 
echo     "APPCMD restore backup beforeRootMove" 
echo and 
echo     "REG delete HKLM\System\CurrentControlSet\Services\WAS\Parameters\ConfigIsolationPath"
echo You also have to reset the PathWWWRoot and PathFTPRoot registry values
echo in HKEY_LOCAL_MACHINE\Software\Microsoft\InetStp.
echo ===============================================================================
echo.
echo.
endlocal
goto success

REM error message if no argument or drive does not exist
:err
echo. 
echo New root drive letter required. 
echo Here an example how to move the IIS root to the F:\ drive:
echo. 
echo MOVEIISROOT.BAT F
echo.
echo. 

:success


MOVE_CA_SITE.ps1:

Add-PsSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
[VOID][reflection.assembly]::LoadWithPartialName("Microsoft.SharePoint")

$CentralAdminURL = Read-Host "Enter the Central Admin URL"

$CANewVirtualDirectory = Read-Host "Enter the new virtual directory you want to change it to"

$CASite = new-object Microsoft.SharePoint.SPSite($CentralAdminURL)
$CAWebApp = $CASite.WebApplication
 
$VirtualDirectory = $CAWebApp.IisSettings[[Microsoft.SharePoint.Administration.SPUrlZone]::Default]

Write-host Your current virtual directory for $CentralAdminURL is $VirtualDirectory.Path
Write-host This will be set to $CANewVirtualDirectory

Write-Host "Press any key to continue..."
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")

xcopy $VirtualDirectory.Path $CANewVirtualDirectory /I /E /H /O /X /K
 
$VirtualDirectory.Path = $CANewVirtualDirectory
$CAWebApp.Update()


Write-Host -fore green Success!! 
Write-Host IMPORTANT: -back blue Your virtual directory for $CentralAdminURL has been copied and updated in the Config Database. Please update IIS and point the Central Admin web site to the new virtual directory ($CANewVirtualDirectory). You would need to do an IISRESET on your Central Admin server and youre done!

$CASite.Dispose()

Write-Host "Press any key to exit..."
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")





Tuesday, November 26, 2013

Automatic Refresh Fails in Windows Server 2012, Server Manager Kerberos Authentication Failed

Automatic Refresh fails in Windows Server 2012 when servers are in Clusters or in Server Manager added server shows "Kerberos Authentication Failed"


Had this issue when trying to setup a cluster in VMWare. It was a pretty odd error - when the server booted, the Server Manager showed a Red Flag with the message 'Refresh Failed'. In viewing the servers (All Servers), the second server indicated "Kerberos Authentication Failed". Oddly enough, in checking the 2nd server, low and behold, no errors at all. 

Issue turns out to be VERY simple - you MUST be logged in as a domain account that is included in the Administrators (i.e. Local Users and Groups Administrators) group; you cannot use any local system account. 

If you need to use the local administrator account for some reason, you can disregard these errors.

Monday, October 28, 2013

Send Alert or Email to Group Distribution List from SharePoint 2013/2010

So you want to use a group distribution list for SharePoint Alerts? This is not as easy as you think!

A recent client had us setup an Event Receiver that distributes a link or even the complete post of a blog site to selected users by group. The purpose of the group is that the distribution is sometimes company wide and sending out individual emails is obviously not an option.

When first setup, the client could not get it to work - after all, an email address is an email address, right? Not so with SharePoint - it does not support standard (aka: Outlook) distribution groups, it only supports global.

However, we found a workaround - this will work for you with SharePoint Alerts and in the event you need to setup a email send via an event receiver or App.

Three simple steps:


  1. Create a distribution group or use an existing, change type from Universal Distribution to Universal Security.
  2. Navigate to the group in the Exchange Admin Console (Management Console) and edit properties to allow "Senders from inside and outside my organization" under delivery management. (If delivery is restricted to a group of users, make sure the user sending the email/alerts is included in the list)
  3. Navigate to the Exchange Management Shell and change "Require that all senders are authenticated" to "false"

Viola!

Friday, August 2, 2013

VMWare Error: Error in the RPC receive loop: RpcIn: Unable to send

With VMWare ESX and VMWare Workstation, you might encounter this error flooding the Windows Application event log (the error appears repeatedly in the server - every second or so!):

[ warning] [vmusr:vmusr] Error in the RPC receive loop: RpcIn: Unable to send.

or another error:


[ warning] [vmusr:vmtoolsd] Failed registration of app type 2 (Signals) from plugin unity.

This is a known bug for VMWare due to a Configuration file missing.  

----
UPDATE: The below might work for you however, I found that on a few systems, creating the file does NOT correct the errors. On these systems, I was able to correct by doing a VMWare Tools Repair (i.e. Control Panel > Programs and Features, click on VMWare Tools and select Repair instead of uninstall) - interestingly enough, the repair operation REMOVED the Tools.conf file. 

Flaky - very flaky. 

My suggestion - try running the repair first, do a reboot of the VM and if the problem continues...read on:
----

In the VMWare Tools folder (C:\Program Files\VMware\VMware Tools), check for a file called "tools.conf"; if not found, create a new text file (called tools.conf) and add the following code:

[logging]
log = true
# Enable tools service logging to vmware.log
vmsvc.level = debug 
vmsvc.handler = vmx
# Enable new "vmusr" service logging to vmware.log
vmusr.level = error
vmusr.handler = vmx
# Enable "Volume Shadow Copy" service logging to vmware.log
vmvss.level = debug
vmvss.handler = vmx

Note that these two: 

vmsvc.level = debug 
vmvss.level = debug

Can also be set to 'error' (logs more items).

After saving & closing the file, open the Services console (Start > Administrative Tools > Services) or use Start > Run then enter Services.msc.

Locate the VMTools service and start it if stopped or do restart (stop/start) if already running. Note that a reboot may be required!


In some cases this does NOT fix the immediate problem so it may require one additional step: Open the Services console and locate the VMWare Snapshot Provider service. Change the setting from Manual to Automatic and make sure it is started. Be aware however, that the message:

[ warning] [vmusr:vmtoolsd] Failed registration of app type 2 (Signals) from plugin unity.

May still appear (but only once on a reboot). Since it is a warning, it's reasonably safe to assume it is OK.

Sunday, July 28, 2013

SharePoint 2010 V4 Master Breaks Search Site

SharePoint 2010 V4 Master Breaks Search Site
Hey – I know it’s dated (with 2013 out and all) but I've had to help so many fix this nagging problem with 2010 master pages that I am formally posting it.

If you have ever tried to use the Search Center site, you should have noticed that this particular site always uses the ‘minimal.master’:



For many, that’s fine but most folks want to customize their master or at least use the v4.master on all sites so it is consistent. Using the v4.master (or a customized copy of it) then pushing it down to all sites it will in fact ‘break’ the search page:



As you can see, the search box is missing and there is an odd box on the left. In reality, the search box is still there, just in the wrong place – it appears under the ‘Navigate Up’ icon:
(Now that’s QA for ya)

Fixing this is fortunately not a very big deal (just takes some time) – the process is to simply create an additional master page specifically for the search site. The original v4.master (or master derived from it) should be left alone – the changes here are ONLY for the Search Site!

Step 1)
  1.  Download the v4.master (or master you are using based on v4)
  2.  Name the file <name>_search.master (i.e. v4_search.master)
  3.  Make a copy of it so you can restore/start over if you have to

Step 2)

1. Open the file in Notepad, Notepad++ or Visual Studio (do NOT use SharePoint Designer!)
2. Search the code to find this line:

       <SharePoint:SPHelpPageComponent Visible="false" runat="server"/>

3.    Add this below it:


       <style type="text/css">
              #s4-leftpanel {
                     display: none !important;
              }
             
              #MSO_ContentTable {
                     margin-left: 0 !important;
              }
       </style>

4.       Next, find this:

<div class="s4-breadcrumb-top">
       <asp:Label runat="server" CssClass="s4-breadcrumb-header" Text="<%$Resources:wss,master_breadcrumbHeader%>" />
</div>
 <asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server">
       <SharePoint:ListSiteMapPath
              runat="server"
              SiteMapProviders="SPSiteMapProvider,SPContentMapProvider"
              RenderCurrentNodeAsLink="false"
              PathSeparator=""
              CssClass="s4-breadcrumb"
              NodeStyle-CssClass="s4-breadcrumbNode"
              CurrentNodeStyle-CssClass="s4-breadcrumbCurrentNode"
              RootNodeStyle-CssClass="s4-breadcrumbRootNode"
              NodeImageOffsetX=0
              NodeImageOffsetY=353
              NodeImageWidth=16
              NodeImageHeight=16
              NodeImageUrl="/_layouts/images/fgimg.png"
              RTLNodeImageOffsetX=0
              RTLNodeImageOffsetY=376
              RTLNodeImageWidth=16
              RTLNodeImageHeight=16
              RTLNodeImageUrl="/_layouts/images/fgimg.png"
              HideInteriorRootNodes="true"
              SkipLinkText="" />
       </asp:ContentPlaceHolder>
</SharePoint:PopoutMenu>

5.       Copy then delete these two lines:

<asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server">
...
</asp:ContentPlaceHolder>

After the edit, the code should look like this:
<div class="s4-breadcrumb-top">
       <asp:Label runat="server" CssClass="s4-breadcrumb-header" Text="<%$Resources:wss,master_breadcrumbHeader%>" />
</div>
       <SharePoint:ListSiteMapPath
              runat="server"
              SiteMapProviders="SPSiteMapProvider,SPContentMapProvider"
              RenderCurrentNodeAsLink="false"
              PathSeparator=""
              CssClass="s4-breadcrumb"
              NodeStyle-CssClass="s4-breadcrumbNode"
              CurrentNodeStyle-CssClass="s4-breadcrumbCurrentNode"
              RootNodeStyle-CssClass="s4-breadcrumbRootNode"
              NodeImageOffsetX=0
              NodeImageOffsetY=353
              NodeImageWidth=16
              NodeImageHeight=16
              NodeImageUrl="/_layouts/images/fgimg.png"
              RTLNodeImageOffsetX=0
              RTLNodeImageOffsetY=376
              RTLNodeImageWidth=16
              RTLNodeImageHeight=16
              RTLNodeImageUrl="/_layouts/images/fgimg.png"
              HideInteriorRootNodes="true"
              SkipLinkText="" />
</SharePoint:PopoutMenu>

6.       Next, find this:

       <a name="mainContent"></a>
       <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server">
       </asp:ContentPlaceHolder>
       </div>

7.       Paste in these two lines after the <a name="mainContent"></a> line:

<asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server">
</asp:ContentPlaceHolder>

After the edit, it should look like this:
<a name="mainContent"></a>
       <asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server">
       </asp:ContentPlaceHolder>
       <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server">
       </asp:ContentPlaceHolder>
       </div>

8.       Save the file then upload to your Master Page Gallery library (or deploy it via  a feature – whatever works; for testing, uploading is fine) – be sure it is published and approved!

9.       Navigate to the Search site and change the master page to the new master – if all was edited properly, the home page should appear correct: