Month: October 2013

Operation failed because the certificate has validation errors – SharePoint 2013

SharePoint 2013 sites were responding really slow. In the event viewer, Event ID 8311 was appearing every 15 minutes or so.


  1. Get the “SharePoint Root Authority” certificate as a physical (.cer) file. To get the certificate
    • Launch the SharePoint 2010 PowerShell window as Administrator
    $rootCertificate = (Get-SPCertificateAuthority).RootCertificate
    $rootCertificate.Export("Cert")|Set-Content C:\SharePointRootAuthority.cer -Encoding byte

    The .cer file exported in this step can be used on other servers in the farm without having to run the PowerShell commands again.

  2. Import the “SharePoint Root Authority” certificate to the Trusted Root Certification store.
    Now that we have the certificate file exported from SharePoint, we can add it to the server’s Trusted Root Certification Authorities list of certificates.
  • Go to Start > Run > MMC > Enter
  • File >Add/Remove Snap-in
  • Certificates > Add > Computer account > Next >
  • Local computer > Finish > OK
  • Expand Certificates (Local Computer), expand Trusted Root Certification Authorities > Right-click Certificates > All tasks > Import
  • Next > Browse > navigate to the location where you saved .cer file earlier and select it >Open > Next > Next > Finish > OK

You should see improvement in site’s performance and the error will not come up anymore.

SharePoint 2013 – Search Service Application: IndexLocation value cannot be null

I got a strange error on the creation of the Search Service Application in SharePoint 2013. It complains that the “indexLocation” parameter cannot be null.
But there is no such parameter while (just) creating Search Service Application. According to this TechNet, the only required parameters are name and application pool.
I solved this issue by starting Search Host Controller Service as well as Search Query and Site Settings Service before running New-SPEnterpriseSearchServiceApplication.
You can start these SharePoint services from Central Administration (Application Management > Manage Services on Server).
Alternatively, you can open SharePoint Management Shell and enter:

Get-SPEnterpriseSearchServiceInstance -Local | Start-SPEnterpriseSearchServiceInstance;
Get-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance -Local | Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance;

I will be posting a complete script to configure Search Service Application soon.

How to change the “SharePoint” text in the top left corner – SharePoint 2013

If you didn’t like the text ‘SharePoint’ in top left corner of your SharePoint 2013 site, you can change it to some other text or create a link you can do so just by running a small powershell command.

$wa = Get-SPWebApplication "http://webAppURL"
$wa.SuiteBarBrandingElementHtml = "Something other than SharePoint"

There is one of few new delegate controls that can be overridden to display some other text, or image (logo) or link in the top-left corner of SharePoint 2013 site. That is SuiteBarBrandingDelegate Delegate Control.


<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="">
  <Control ControlSrc="/_controltemplates/15/CustomDelegateControls/SuiteBarBrandingDelegate.ascx"
           Sequence="1" />   

User Control: (SuiteBarBrandingDelegate.ascx)

<div class="ms-core-brandingText" id="BrandingTextControl" runat="server" /> 

UC code behind: (SuiteBarBrandingDelegate.ascx.cs)

protected void Page_Load(object sender, EventArgs e)
    BrandingTextControl.Controls.Add(new Literal
        Text = string.Format("<a href='{0}'><img src='{1}' alt='{2}' /></a>", SPContext.Current.Site.Url,
        "/_layouts/15/images/CustomDelegateControls/logo.png", SPContext.Current.Site.RootWeb.Title)

ERROR “Unknown SQL Exception 18452 occured” – SharePoint 2013

I have received the following error message:

Login failed:The login is from an untrusted domain
“ERROR “Unknown SQL Exception 18452 occured. Additional error information from SQL Server is included below. Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.” in Event Viewer when sharepoint server trying to connect SQL server.

This issue because of connectivity issue between AD and SQL server.

1. Check the time zone and date and time between AD and SQL server, if any changes, please correct it and restart the client machine
2. Still if you face the issue, run the following command on client machine

gpudpate /force
gpupdate /sync

3. Still if you face the issue, rejoin the SQL machine in the domain