Wednesday, May 13, 2015

Searching SharePoint using the REST Interface is very slow sometimes

Problem:

Happened with me using SharePoint 2013 - calling the SP 2013 restful service to search the index, results come back quickly except for some calls it takes long time. This slowness occured almost every 10 minutes.


Example query as simple as the below: 
http://server:port/_api/search/query?querytext='anything'

Solution: 
Checking the Windows Event Log (Event Viewer) showed an exception that is thrown every n minutes, the exception was:
"A certificate validation operation took X milliseconds and has exceeded the execution time threshold.  If this continues to occur, it may represent a configuration issue.  Please see http://go.microsoft.com/fwlink/?LinkId=246987 for more details."
The trick was to only enable access to the internet on my SharePoint server to enable certificate revocation list (CRL) check for the SharePoint root certificate without causing delays to the original _api request.
There are other solutions if you dont want your server to have access to the internet:
  1. Install the SharePoint Root Authority certificate in the Trusted Root Certification Authorities store
  2. Disable the automatic update of root certificates on the SharePoint Servers

These 2 solutions are escribed in details here https://support.microsoft.com/en-us/kb/2625048?wa=wsignin1.0 

Hope this helps


Wednesday, September 21, 2011

Visual Studio 2010 Server Explorer and SharePoint

A simple, yet cool, feature in Visual Studio 2010 is that you can connect Server Explorer to your SharePoint site and view its content hierarchy … this is helpful in giving you a quick view of your site content without the need to switch your IDE window… for some item types like document libraries and lists, it gives you quick access to an SP item through a link to the SharePoint page to manage it

P.S: I tried this with VS 2010 and SharePoint 2010