Posts

SharePoint Configuration Errors: Where to Find Them and How to Fix Them

SharePoint Configuration Errors: Where to Find Them and How to Fix Them

If you work with Microsoft SharePoint, you’ve likely come across the following error screen at some point in your career:

1

The error message is not particularly descriptive and in this example, I’ve only been given insight that a file is missing.  If a client sends in a screenshot like this, it’s really not enough information for me to take action. So, I recommend asking the client to recreate the issue and this time to click on the ‘Technical Details’ link before taking the screenshot:

2

The important information under ‘Technical Details’ is the time of the error and the Correlation ID. Take note of both pieces of information, then log onto the server.

Now that you’ve logged onto the server, open the SharePoint 2013 Management Shell (this is PowerShell with the SharePoint Cmdlets loaded) and run the Merge-SPLogFile Cmdlet (https://technet.microsoft.com/en-CA/library/ff607721.aspx):

Merge-SPLogFile -Correlation “579c8c9d-da45-0078-a71b-cfacae7f593c” -path c:\error.txt

Once it is finished running, you will see an error.txt file on your C drive that contains all of the log entries related to this error.  The file pulls from each server in the SharePoint farm, so there is no need to log into each server to look for more error messages.  Additionally, there are a number of other options to use for narrowing down which logs are returned, including:

  • Time frame
  • Category / Area
  • Etc.

Other Considerations

  1. It doesn’t matter where your log files are stored, the Cmdlet handles that for you.
  2. If you didn’t log it, this Cmdlet won’t find it.  Based on the severity of the error, you may need to temporarily increase the verbosity of the logging.  Make sure your log settings are not left at high levels as this may affect performance. Logging is set up by going to central admin > monitoring > configure diagnostic logging.
  3. If you get the error “The term “Merge-SPLogFile is not recognized as the name of a cmdlet, function, script file, etc.…” you’ve probably forgot to load the SharePoint Cmdlets.  Either load them manually or open the SharePoint 2013 Management Shell from the start menu.
  4. If you get an error screen and your Correlation Id is all zeros, look for the error in the Event Viewer.

3

 

Fixing Errors

When looking at the log file you’ve created for your error there could be a LOT of information that doesn’t make sense or seem to relate to the issue you’re seeing. Here is my advice when looking through these files:

  1. Look for lines that have a level of “unexpected”.  The first “unexpected” line of logging usually contains the error message that is most relevant.
  2. If the unexpected error doesn’t make sense, try scrolling up, there may have been an error earlier in the page request processing that caused the unexpected error.
  3. Ignore these: “[Forced due to logging gap”
  4. Don’t forget to look to the “Category” column for clues
  5. Search for any details in the “Message” column that you don’t understand
  6. For this example, here’s mine:

Category – Runtime

Level – Unexpected

Message – System.IO.FileNotFoundException: The Web application at https://test.mydomain.com could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to …

Ah ha!  It couldn’t find my web application. I forgot that I had removed it previously, and so it turns out I wasn’t a missing file at all!

Quality Conf 16.2 Recap: Logging Like it Matters

 

On December 16, 2016, DevFacto hosted Quality Conf 16.2 – a full-day internal conference dedicated to learning and team building. A number of sessions were presented by our team members which focused on everything from personal to technical growth. In this post, we recap “Logging Like it Matters” which was originally presented by DevFacto consultant Mark Thiessen.

Read more

Quality Conf 16.2 Recap: Introduction to React

 

On December 16, 2016, DevFacto hosted Quality Conf 16.2 – a full-day internal conference dedicated to learning and team building.  A number of sessions were presented by our team members which focused on everything from personal to technical growth.  In this post, we recap “Introduction to React” which was originally presented by DevFacto consultant Chris Nissen. Read more

Quality Conf 16.2 Recap: The New SharePoint Framework

On December 16, 2016, DevFacto hosted Quality Conf 16.2 – a full-day internal conference dedicated to learning and team building.  A number of sessions were presented by our team members which focused on everything from personal to technical growth.  In this post, we recap “The New SharePoint Framework” which was originally presented by DevFacto consultants Chris Buchanan and Vili Bogdan.

Read more

Everyday IA – The Search for Hot Sauce

Today, I was tasked with picking up a bottle of Frank’s RedHot Sauce for supper. Once I entered the grocery store, I began scanning the large hanging boards that list the 6-8 types of items found in each aisle. My previous shopping experience lead me to look for the hot sauce near the ketchup and I know that ketchup is usually classified as a condiment. Unfortunately, I could not see “Condiments” on any of those large hanging boards. I did, however, see “Mexican” on one of the signs and thinking that perhaps hot sauce wasn’t far from salsa (they are both spicy), I ventured down that aisle. Alas, no hot sauce. Read more

Industry Trends: 2015 Summary

As consultants, we get opportunities to work with a variety of clients in different industries. We’re often advising and helping with new ideas and technology and it’s critical that we are up to date and aware of industry trends. Read more

RESOLVED: Encountering Error 1603 While Installing SharePoint 2013 on Windows Server 2012 R2

While setting up some new development workstations, we encountered an error during SharePoint 2013 + SP1 installation which we had seen again and again.

To recap: The prerequisites install fine, SharePoint Setup runs, and then seemingly at the last step, it fails with:

osiserver.msi: “SharePoint Server 2013 encountered an error during setup”, Error Code 1603

Unsatisfied with the workarounds (read MSIBreak or the ORCA tool or changing the number of processors), and after having updated Windows with the latest patches, I called Microsoft and worked for weeks with their engineers at diagnosing the root issue of the problem, which for us was:

The SharePoint ArpWrite action (registering SharePoint 2013 as installed in the registry) attempted to access a missing registry key at HKLM:\SOFTWARE\Policies\Microsoft\Windows\Installer

So to resolve this, we wrote the following PowerShell script (run as Administrator):

if(!(Test-Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Installer)){
New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Installer | Out-Null
}

$regProps = Get-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Installer

if(! $regProps.logging){
New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Installer -Name logging -Value voicewarmup -PropertyType String | Out-Null
}

if(! $regProps.debug){
New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Installer -Name debug -Value 3 -PropertyType DWord | Out-Null
}

And much to our shock, the installation succeeded!

Hopefully, this article can help anyone else out there with this problem until Microsoft publishes a fix or an updated installer.

QualityConf 2015

I had an amazing time at QUALITYCONF. I will jump at any chance to sketchnote some great topics from engaging speakers, and QUALITYCONF did not disappoint. This DevFacto event happened from March 27 to 29 at Stone Ridge Mountain Resort in Canmore Alberta. Read more

Avoid Trying to Predict the Future with Cloud Scaling

In software development, we’re often required to make predictions about the future with little information. Read more

Quantifying the Cross-Platform Conundrum

When I first started out as a mobile app developer, I was constantly struggling with the question of how to build the best experience on the most devices with the least effort. A survey of my peers offered little help – usually I get a passionate overview of a favorite platform, but invariably we end up with the same outcome: “It depends.” Read more