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

Monday, February 20, 2017

SharePoint Backup failure "A system assertion check has failed" - Health Message "Expired sessions are not being deleted from the ASP.NET Session State database"

SharePoint 2013/2016 On Premise:

A problem may occur when you run a backup - it fails and for each database, you see a message that looks like this:

Object SharePoint_Config failed in event OnBackup. For more information, see the spbackup.log or sprestore.log file located in the backup directory. 
SqlException: A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a QFE from Technical Support. 
BACKUP DATABASE is terminating abnormally. 

Wow - pretty scary eh? Most likely if you check your Health monitor, you see another error:

Expired sessions are not being deleted from the ASP.NET Session State database.

DON'T PANIC - It turns out to be a simple problem! The SQL Server Agent Service is NOT running. Thus the backup cannot get proper control of the database and the timer job to clear session state won't be running.

Start the Agent on SQL Server first then for the Backup issue:

Delete whatever backup files were created (they are junk), start the backup again.

For the Health error:

Open the Health Monitor from Central Admin, click on the error (Expired sessions...) and click the Re-analyze button.



Friday, February 17, 2017

SharePoint Online workflow emails in Office 365

Another issue in SharePoint Online regarding workflows.

When you create a workflow, it obviously creates a task and sends an email to the participant(s) that they have a task.

However, minor issue - in Outlook 365, the email message states "Click the Open this task button" to open the task. In regular Outlook, this 'button' appears in the toolbar when you open the mail message. However, in Outlook 365, this button is nowhere to be found!

This means a training issue - when you are using workflows that send emails, the link to the task is missing so you must tell your users to navigate to the site itself, open the appropriate Task List and respond to the task.

SharePoint Library templates in SharePoint Online drop content

Having used Office 365 for quite a while, there's been some oddities as of late. One I have encountered was creating a List/Library template and including the content. This is a common feature I use when doing On Premise so I would assume that it would be the same, but Au Contraire!

In Office 365/SharePoint Online I created a simple document library with a few additional fields - in this case, year and month - so I could quickly duplicate a library format. A quick view of this looks like this:


In the SAME SITE, I created a new library using the template where I included the content - surprise, the some of the data was lost:


Looks like they need to tighten up a few things eh?

Solution? Use a template if you need to but remember you'll have to check all of the data!

Thursday, February 2, 2017

Wiki Page Library - Updated Pages - An error has occurred on the server - SharePoint Online/2013/2016

When working with Wiki Page Libraries, you may encounter an error when opening the library (in fact, I've had this be the norm in Office 365/SharePoint Online).

When you open the Home Page (or view the Pages library), you'll see an error on the left under "Updated Pages" showing "An error has occurred on the server":


Turns out this is not just a little problem - looks like QA missed a few things. The error is caused because there is NO INDEX on the list, therefore it fails as above.

To fix this, you need to open the Library Settings (click the PAGE tab, then Library Settings in the ribbon):


On the Settings page, scroll down to the Columns section and click on Indexed Columns:

On the Indexed Columns page, click Create a new index:


Use the drop down to select the Modified column (and WAIT for the page to refresh) then click the Create button:

There will be a 'working on it' page for a few seconds (depending!) but when it comes back you will see the new index:


Click the Settings breadcrumb then the Library name - this returns you to the pages view of the library. You'll notice that it is fixed!


Simply click on the name of the Home page to open the library in Wiki view.





Wednesday, February 1, 2017

SharePoint 2013 Prerequisites - unable to install Application Server Role, Web Server (IIS) Role

While I've posted before on this, the other solutions I've used didn't work. I resorted to my own version of the installation process when you get this error.

Open up PowerShell (using 'Run as administrator') and enter the following as 'groups' (run one command at a time):

Set-ExecutionPolicy Unrestricted

Enter Y when prompted, next:

Import-Module ServerManager

Next:

Add-WindowsFeature NET-Framework-45-Core,NET-Framework-45-ASPNET,Web-Net-Ext45,Web-Asp-Net45,Web-Includes,NET-WCF-HTTP-Activation45,NET-WCF-TCP-Activation45,NET-WCF-Pipe-Activation45

This should indicate success - next:

Add-WindowsFeature Net-Framework-Features,Web-Server,Web-WebServer,Web-Common-Http,Web-Static-Content,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor,Web-Http-Tracing,Web-Security,Web-Basic-Auth,Web-Windows-Auth,Web-Filtering,Web-Digest-Auth,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,Application-Server,AS-Web-Support,AS-TCP-Port-Sharing,AS-WAS-Support, AS-HTTP-Activation,AS-TCP-Activation,AS-Named-Pipes,AS-Net-Framework,WAS,WAS-Process-Model,WAS-NET-Environment,WAS-Config-APIs,Web-Lgcy-Scripting,Windows-Identity-Foundation,Server-Media-Foundation,Xps-Viewer

This should also indicate success (it may also indicate No Changes Needed).

For best results, run the Prerequisites UI again just to make sure.

FOLLOW UP: I had one server that just would not get corrected; it still indicated that the Web Server role had a configuration error.

In this case, I decided to try loading up a W2012 server and not apply the Windows Update but install SharePoint first - SAME PROBLEM.

Fix: I tried loading the installation that has SP1 already - running the Prerequisites alone (from the install disk using 'Run as administrator') it worked!

Friday, January 6, 2017

Restoring SharePoint site default groups

Occasionally, a default group for a SharePoint site collection can get deleted. When it does, it means that non-owners cannot invite others to the site and you might receive an error in places:

 “The groups required to manage users for your site are missing

You'll most likely see this under Access request settings (Site Settings > Site Permissions > Access request settings in the ribbon).

Getting the default groups back is not very obvious but as it turns out, it is quite simple. Simply open the site in question and change the URL to:

<site url>/_layouts/permsetup.aspx

This will open up the People and Groups page with the default groups:



Click the OK Button and the groups will be restored!

Saturday, December 17, 2016

Creating Site Templates in SharePoint 2016 and SharePoint Online (including Publishing sites!)

Like many of you, I was dismayed to find that SharePoint Online can't be used to create templates and have always not liked being able to save a Publishing Site as a template.

In SPO, Microsoft says that since they automatically turn on Publishing that it cannot be done and that turning off publishing (which has to be done for the entire site collection) won't fix it because there are other features that are enabled. If you test it out, you'll find this to be the case.

In SP on premise, Microsoft disables the option to save publishing sites, however use either Workaround below and it does!

WARNING 1: If you try to save a site with content, most commonly a publishing site, it will FAIL if there is too much content. Best to save with a near-empty site!

WARNING 2: When you save a publishing site as a template using Metadata Navigation, the Navigation will be screwed up when you create a site from the template. It has to be reset to fix it through Site Settings > Navigation.

So - two ways to set the property to enable saving as a template:

Workaround 1:
http://blogs.msdn.microsoft.com/how24/2013/06/13/save-sharepoint-2013-publishing-site-as-a-template/

* THIS works in the on premise version.

Another way to get around it is through SharePoint Designer:

Workaround 2:
http://community.bamboosolutions.com/blogs/sharepoint-2013/archive/2014/05/12/how-to-enable-save-site-as-template-in-sharepoint-2013-using-sharepoint-designer.aspx

* THIS works in the online version.

ANOTHER way to set the property in SharePoint Online is through the SharePoint Online Management Shell (setting the Property Bag):

$SiteUrl = "https://somesite.sharepoint.com/"
$context = New-Object Microsoft.SharePoint.Client.ClientContext($SiteUrl)
$sUserName = "someone@somedom.com"
# Prompt for Password:
$sPassword = Read-Host -Prompt "Enter your password: " -AsSecureString
# Set the Site URL:
$spoCredentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($sUsername, $sPassword) 
$context.Credentials = $spoCredentials
$web = $context.Site.RootWeb
$web.AllProperties["SaveSiteAsTemplateEnabled"] = "true"
$web.Update()

* This doesn't always work on Publishing Sites so I'd suggest using the Designer method.

However, I found that these solutions don't always work, particularly in SharePoint Online. There are hidden features (i.e. can't be turned on through the UI) that prevent the template from working in other site collections. I did however finally find a way to get it to work using the SharePoint Online Management Shell. By running the following script on the site collection, it enables all of the features you need to get the templates to work.

Once this script is run, you can go to the site you want to make a template of and simply alter the URL - so:

https://somesite.sharepoint.com/sitename

Enter:

https://somesite.sharepoint.com/sitename/_layouts/15/savetmpl.aspx

Kudos to the following post:
https://gallery.technet.microsoft.com/office/How-to-enable-a-SharePoint-5bb614c7

Here's the script - simply set the account name and the URL path to the site collection accordingly.

===========================================================
NOTE: You have to get a copy of the DLL's necessary for the following lines:

Add-Type -Path "C:\temp\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\temp\Microsoft.SharePoint.Client.Runtime.dll"

If you have an on-premise copy, you get get them from the ISAPI folder:
c:\program files\common files\microsoft shared\web server extensions\15\ISAPI

OR download them from here:

https://www.microsoft.com/en-us/download/details.aspx?id=35585
===========================================================

To use a template, you have to enable these features at the TOP LEVEL site collection; that is, say you create a template in Collection 1, you have to enable these features to use the template in Collection 2. 

$host.Runspace.ThreadOptions = "ReuseThread"
#Definition of the function that allows to enable a SPO Feature
function Enable-SPOFeature
{
param ($sSiteColUrl,$sUserName,$sPassword,$sFeatureGuid) 
try
{
#Adding the Client OM Assemblies 
Add-Type -Path "C:\temp\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\temp\Microsoft.SharePoint.Client.Runtime.dll"
#SPO Client Object Model Context 
$spoCtx = New-Object Microsoft.SharePoint.Client.ClientContext($sSiteColUrl) 
$spoCredentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($sUsername, $sPassword) 
$spoCtx.Credentials = $spoCredentials
Write-Host "----------------------------------------------------------------------------" -foregroundcolor Green
Write-Host "Enabling the Feature with GUID $sFeatureGuid !!" -ForegroundColor Green
Write-Host "----------------------------------------------------------------------------" -foregroundcolor Green
$guiFeatureGuid = [System.Guid] $sFeatureGuid
$spoSite=$spoCtx.site 
$spoSite.Features.Add($sFeatureGuid, $true, [Microsoft.SharePoint.Client.FeatureDefinitionScope]::None) 
$spoCtx.ExecuteQuery() 
$spoCtx.Dispose() 
}
catch [System.Exception]
{
write-host -f red $_.Exception.ToString() 
}
}

# Required Parameters

# Modify Username above with your administrator credentials:
$sUserName = "someone@somedom.com"

# Prompt for Password:
$sPassword = Read-Host -Prompt "Enter your password: " -AsSecureString


$sSiteColUrl = "https://somesite.sharepoint.com"
# Modify feature ID as needed (this one is MobileExcelWebAccess needed to use templates):
$sFeatureGuid= "e995e28b-9ba8-4668-9933-cf5c146d7a9f"
# Enable it (MobileExcelWebAccess): 
Enable-SPOFeature -sSiteColUrl $sSiteColUrl -sUserName $sUserName -sPassword $sPassword -sFeatureGuid $sFeatureGuid 
# Library and Folder Based Retention - LocationBasedPolicy Feature
$sFeatureGuid= "063c26fa-3ccc-4180-8a84-b6f98e991df3"
# Enable it (LocationBasedPolicy): 
Enable-SPOFeature -sSiteColUrl $sSiteColUrl -sUserName $sUserName -sPassword $sPassword -sFeatureGuid $sFeatureGuid 
# Site Policy - ProjectBasedPolicy Feature
$sFeatureGuid= "2fcd5f8a-26b7-4a6a-9755-918566dba90a"
# Enable it (ProjectBasedPolicy): 
Enable-SPOFeature -sSiteColUrl $sSiteColUrl -sUserName $sUserName -sPassword $sPassword -sFeatureGuid $sFeatureGuid 
# Three-state workflow - IssueTrackingWorkflow Feature:
$sFeatureGuid= "fde5d850-671e-4143-950a-87b473922dc7"
# Enable it (IssueTrackingWorkflow): 
Enable-SPOFeature -sSiteColUrl $sSiteColUrl -sUserName $sUserName -sPassword $sPassword -sFeatureGuid $sFeatureGuid 
# SitePageResources Feature
$sFeatureGuid= "ff77ac56-88d0-4147-b865-e84f5f03fc42"
# Enable it (SitePageResources): 
Enable-SPOFeature -sSiteColUrl $sSiteColUrl -sUserName $sUserName -sPassword $sPassword -sFeatureGuid $sFeatureGuid