Why is my classic SharePoint page so slow?

Troubleshooting performance issues for SharePoint online can sometimes be a bit of a challenge. A lot of things can have impact on the performance of your page. Microsoft has now released a Chrome browser extension called Page Diagnostics. This tool can help you in your performance troubleshooting. Continue reading Why is my classic SharePoint page so slow?

SharePoint 2010: HTTP Error 503 – Service Unavailable.

KBID

EXP-INC-00003

Title

HTTP Error 503. Service Unavailable

Introduction

When you are working with SharePoint 2010 or SharePoint 2013 environments you probably have seen the HTTP Error 503. Service Unavailable error at some point. This error can have several causes, when you use your favourite search engine you can find a lot of articles on this subject.

Some common causes can be:

  • a disabled application pool
  • an invalid identity for a application pool because of an expired password.

This article describes how I ran into an issue with a group policy that caused a HTTP Error 503.

Symptoms

When you navigate to a SharePoint 2010 site you get an error:
HTTP Error 503. Service Unavailable

HTTP Error 503. Service Unavailable

Steps to Reproduce

1. Navigate to your SharePoint 2010 site

Cause

In my case this error was caused by a removal of Log on as a batch permissions of the Application Pool account on one of the Application servers in a SharePoint 2010 farm. The application pool account of your web application needs this permission on the server where it is running, you can also check out Corey Roth his blogpost on this topic, Corey’s Guide to SharePoint Service Accounts.

When navigating to the System Log on one of the servers in the SharePoint 2010 farm I saw an event of the Windows Process Activation Service (WAS) source with ID 5021:
The identity of application pool ‘yourapplicationpoolname’ is invalid. The user name or password that is specified for the identity may be incorrect, or the user may not have batch logon rights. If the identity is not corrected, the application pool will be disabled when the application pool receives its first request. If batch logon rights are causing the problem, the identity in the IIS configuration store must be changed after rights have been granted before Windows Process Activation Service (WAS) can retry the logon. If the identity remains invalid after the first request for the application pool is processed, the application pool will be disabled. The data field contains the error number.

System Log - WAS event id 5021
After finding the 5021 event I wanted to check what my Application Pool Identity was. You can check what the identity of your application pool is via the Application Pools view in Internet Information Service (IIS) Manager.

IIS - Application Pool Identity

When you established what your Application Pool identity is you can open the Local Security Policy Editor on the same server. You can also use run and type secpol.msc to fire it up. Check what the Security Setting is for the Log on as a batch job policy.

In my case a custom policy was set which had overwritten the default settings. The result was that the Log on as batch job permissions of the application pool Identity were removed.

Local Security Policy Editor - Log on as a batch job

Applies to

SharePoint 2010, SharePoint 2013

Workaround

Not Applicable

Solution

Add the Application Pool Identity account the Log on as a batch job group policy or give the account permissions via a local policy on the server if you are not using group policies.

References

Dot Net Mafia – Corey’s Guide to SharePoint Service Accounts
Technet – Account permissions and security settings in SharePoint 2013
Technet – Event ID 5021

SharePoint 2013: Not able to connect to search service to retrieve valid settings

KBID

EXP-INC-00001

Title

Not able to connect to search service to retrieve valid settings

Introduction

In SharePoint 2013 there are some changes in how search work. Result sources replace scopes and federated locations. Other changes in search can be found overhere on Technet.

In a result source you can restrict queries to a subset of content by using a query transform. You can use the query builder interface for building such a results source. In SharePoint 2013, site collection administrators, site owners, and site designers can also create and configure result sources to meet their specific requirements.

This article describes how I ran into an issue with building a new results source in the query builder in Central Administration.

Symptoms

When you try to create a new result source from Central Administration in your Search Service Application you get an error:
Error: Not able to connect to search service to retrieve valid settings

Error: Not able to connect to search service to retrieve valid settings

Steps to Reproduce

1. Navigate to Central Administration
2. Go to Application Management > Manage service applications and select your Search Service Application
3. Go to Queries and Results > Results Sources
4. Click on the New Result Source button

Cause

Basicly the cause of this error is that the account which you use to access the Query Builder is not authorized to do this.

To see the cause you can open the ULS logs of SharePoint 2013, with a tool like ULS Viewer. When you find the right correlation you get an event of the level Unexpected:
Exception in Query Builder OnLoad: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Attempted to perform an unauthorized operation. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
at Microsoft.Office.Server.Search.Administration.Ranking.GetRankingModels()
at SyncInvokeGetRankingModels(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)).

SharePoint log error

Btw, if you having trouble filter your log on the following fields and corresponding values, Product – SharePoint Server Search & Category – Query.

Applies to

SharePoint 2013

Workaround

Not Applicable

Solution

Add the account with Full Control permissions to the Administrators for Search Service Application. You can do this via the interface in Central Administration or via Powershell. On TechNet this described in detail, Assign or remove administrators to a service application (SharePoint 2013).

References

Majorbacon – Error: "Not able to connect to search service to retrieve valid settings" or Why won’t my query builder work?
Technet – Assign or remove administrators to a service application (SharePoint 2013)
Technet – Understanding result sources for search in SharePoint Server 2013
Technet – What’s new in search in SharePoint Server 2013

CRM 4.0: errorcodes and Troubleshooting

A big part of my work is in the Incident management field. One of the products I work a lot with is Microsoft Dynamics CRM 4.0. The objective of this post is to give some quick tips and pointers on how to troubleshoot those incidents.

Security Roles
First thing is the ability of reproduction on the CRM environment. Does the same user have the issue in a certain situation. The user context plays a big role in that. From which business unit is the user part of. And what kind of security roles and the access levels on the different privileges always does he or she have? The Microsoft Dynamics CRM 4.0 priviliges by entity Technet article is a good resource.

Tracing
If I can reproduce the incident my next step is always taking a peak in tracing. Of course you should have tracing enabled at that point, in Microsoft knowledge base article 907490 you can find an explanation on how to enable it.

Error codes
There are lots of Error codes, 1359 to be exactly. A complete Microsoft Dynamics CRM 4.0 Error code list can be found on MSDN. You can also download it as an worksheet in the  Most common error code I have seen so far was the 0x80040220 – PrivilegeDenied – The user does not hold the necessary privileges. The user doesn’t have the right access level to complete the the operation. The only problem with Microsoft Dynamics CRM 4.0 is that they write it like that in the log.  

Crm Exception: Message: SecLib::CrmCheckPrivilege failed. Returned hr = -2147220960 on UserId: 2c3519fc-f322-df11-ada7-00155d961205 and PrivilegeId: 2DDDED47-7488-4039-B9FF-81DEFE81FDD3, ErrorCode: –2147220960

You notice three things in the exception:
User: 2c3519fc-f322-df11-ada7-00155d961205
PrivilegeId: 2DDDED47-7488-4039-B9FF-81DEFE81FDD3
ErrorCode: –2147220960

To figure out which user you are looking at in the error is easy. The user name is easy to get from the interface. Log on as and system administrator on your Microsoft Dynamics CRM 4.0 installation. Navigate to Settings > Administration > Users. Open a random user record, a dialog will open. Press F11, you will see a following kind of url: https://url/OrganizationName/biz/users/edit.aspx?id={RandomUserGuid}. Replace the RandomUserGuid with the GUID from the Crm Exception.

PrivilegeId can be a little bit more tricky. It depends if the privilege is from a custom entity or a standard entity. Standard entities can be found in the earlier mentioned Microsoft Dynamics CRM 4.0 priviliges by entity article on Technet. But if you don’t like clicking through you can use a free tool like Find Privilege from Mitch Milam.

For the conversion of the Error Code you can use the calculator on your desktop. Follow the instruction of David Jennaway in his CRM Error Codes blogpost. In the Software Development Kit you also have a Crmhelpers folder which contains the error codes, you can download the latest Microsoft Dynamics CRM 4.0 Software Development Kit on Microsoft Download Center.

Hopefully this will give you some inside on Microsoft Dynamics CRM 4.0 incident troubleshooting. In next version CRM 2011 they have made it a bit more administrator friendly, so more on that to come!