Steps for troubleshooting “My Tasks error in SharePoint 2013 My site“

This post is intended for those who are seeing an error as shown in the image below while accessing the “My Tasks” link in your SharePoint My site. As you all know for yourself the “My Task” link which you see in your SharePoint My site is driven by the “Work Management Service application” and it’s necessary to ensure that the WMA service is turned on and configured to run successfully. While I say the WMA service is the one that takes care of the “My Task “list that’s not the only component on which the “My Task “  list relies upon . There are couple of other dependencies such as “Search crawl” and “User Profile service” which takes care of the “My Task “list.

The “My Task” list in your SharePoint My site can display three different type of tasks ….

  1. The tasks assigned to you from Outlook ( this is possible only when you’re running Exchange Server 2013 and SharePoint Server 2013…they both need to be running on 2013 version )
  2. The tasks assigned to you from MS Project if you have that running in your environment and have configured that to sync with SharePoint.
  3. The tasks assigned to you using the default SharePoint “Task list “.

The Work Management Service Application provides functionality to aggregate tasks to a central location on SharePoint Server:

  1. Users get the possibility to view and track their to-dos and tasks.
  2. Tasks can be cached to a user’s personal site.
  3. Tasks can sync to Outlook where users can edit them wherever they have access to Outlook.
  4. Tasks can be aggregated from Exchange, Project Server and SharePoint.
  5. Based on ‘Provider model’ so that other systems can be integrated in the future.

Now, if the WMA (Work Management Service Application ) is not configured properly then you might end up seeing an error as shown in the figure below and you need to perform the below mentioned troubleshooting steps to get this fixed.

My task

Troubleshooting steps to fix this error:

  1. The Work Management Service Application should use the same account as the web application.
  2. Verify whether the service account for Work Management Service application has full control permissions on the User Profile Service application on Central Administration.
  3. Verify whether the service account for Work Management Service application has full control permissions on the Work Management Service application on Central Administration.
  4. Ensure that you do the above mentioned steps on the instance of the service application which is connected to the My site web application.
  5. Grant “Full Control” to the work management service account on the User Profile service application using “administrators” button on the ribbon.
  6. In addition to that grant “Full control” to the work management service account on the user profile service application using the “permissions” button on the ribbon.
  7. Ensure that the work management service account is given appropriate permissions in the “My site” content database.
  8. Check whether the service account of the Work management service application is equal to the identity of the web application pool because this could be an issue with the permissions too.
  9. Restart the Work management service and the user profile service on the servers.
  10. Perform an IIS reset.
  11. If this didn’t help ,please run the below mentioned PowerShell command

Run the PowerShell command to grant content access to a process account to the MY SITE web application:

  • $webApp = Get-SpWebApplication [URL of the MYSite web application
    $webapp.GrantAccessToProcessIdentity(“[Work Management account]”)
  • Note: this should do three things:
  •      Add the work management account to the user policy of the web application
  •      Add the work  management account to the config database with the permissions of     WSS_Content_Application_Pools
  •      Add the work management account to the My Site content database with the permissions of SPDataAccess.

12. Perform an IIS reset once done and also restarting the server and critical services is recommended.

IMPORTANT:

The tasks are stored in a hidden list called “WmaAggregatorList_User” at the personal site of individual users.

WMA aggregates tasks from SharePoint lists created in SharePoint Server (internally called TasksWithTimelineAndHierarchy-171) plus upgraded SharePoint lists from earlier versions of SharePoint (internally called Task-107 or GanttTasks-150).

 

Advertisements

Patching Distributed Cache in SharePoint Server 2013

The Distributed Cache plays an important role in SharePoint Server 2013 as it’s a key component for performance and caching. Distributed Cache is not a SharePoint service, it’s a standalone service called AppFabric 1.1 for Windows Server. SharePoint Server 2013 requires Windows Server App Fabric and the App Fabric 1.1 CU 1 (KB 2671763) to be installed .It takes care and improves the performance of the following features in SharePoint Server 2013:

  • Authentication
  • Newsfeeds
  • OneNote client access
  • Security Trimming
  • Page load performance

This document explains in detail about the procedure to be followed for patching the App Fabric component in Windows Server. An App Fabric Cumulative Update is exactly the same as a CU for SharePoint, it contains all previous CUs. So if we install CU6 you also get CU1 to CU5 installed.

List of App Fabric 1.1 Cumulative Updates:

Note: If you want to identify the version of App Fabric installed in your machine and also the CU version which is installed, please go to the “Programs and Features” section in Control panel and take a look at installed updates.

AF

  1. The version number would be listed there.
  2. The installed CU would also be listed there with the corresponding KB number.

 

System Requirements:

  1. Windows Server 2012/2012 R2 32-bit or 64-bit.
  2. Before applying the cumulative update, make sure you have administrative privileges on the computer where you’re installing this software.
  3. To apply this cumulative update package, we must have AppFabric 1.1 for Windows Server installed. Additionally, we should also have the Microsoft .NET Framework 4.5 installed.
  4. A system restart is required after installing the Cumulative Update.

Now let’s take a look on the steps to be followed for installing the CU on a server running SharePoint 2013.

Listed below are the steps to be followed for applying the App Fabric CU’s:

  1. Please download the CU from Microsoft download center .I’m considering the CU 6 here. Download link for App Fabric 1.1. CU 6 :_ https://support.microsoft.com/en-us/kb/3042099
  2. Once done downloading the cumulative update package to the server in which you’re going to run it, please run the below mentioned to gracefully shutdown the service instance on the local machine.

Stop-SPDistributedCacheServiceInstance –Graceful

  1. This command will gracefully shutdown the service instance on the local machine. A graceful shutdown means that all the cache items will be distributed to the other service instances in the cache cluster.
  2. Wait for minutes to make sure that all the cached items has properly propagated to the other servers.
  3. Now it’s time to run the package, run the patch executable and follow the instructions. It’s basically a next, next, finish procedure. The App Fabric 1.1 CU 6 doesn’t need any specific change to be made on the exe.config  file like how CU 3 did. So please proceed further by clicking next.
  4. Once you’re done installing the CU, please restart the computer.
  5. When the machine is back online, please run the below mentioned command to start the service instance again. The App Fabric Windows Service will be disabled when its shutdown and we are not supposed to start it manually. Please use the below mentioned PowerShell command to do that.

$instanceName =”SPDistributedCacheService Name=AppFabricCachingService”

$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}

$serviceInstance.Provision()

  1. This command will turn on the Distributed Cache service instance on the machine and will start the AppFabric Windows Service.
  2. Once you’re done completing all the above mentioned steps you’re now ready to move on to the next machine.
  3. Please allow some time for the newly patched cache service instance to catch up.
  4. Finally run the below mentioned commands to check if the Distributed cache service is back online.

To see what  Distributed cache-servers SharePoint thinks there are run this:

Get-SPServiceInstance | ? {($_.service.tostring()) -eq “SPDistributedCacheService              Name=AppFabricCachingService”} | select Server, Status

For AppFabric run this from a machine already in the cache-cluster:

Use-CacheCluster

Get-CacheHost

  1. This will confirm whether the Distributed cache service is back online from a SharePoint as well as from an App Fabric perspective.
  2. For any reason, if you don’t see the status of the servers as “online”, please go ahead and run the below mentioned command to remove and re-add the Distributed Cache Service Instance.

To remove:  Remove-SPDistributedCacheServiceInstance

To Add   :    Add-SPDistributedCacheServiceInstance

  1. Run the remove command first and then wait for couple of minutes and then run the add command.
  2. At last, once everything looks fine you’re good to go ahead and patch the second server following the same steps mentioned above.

Troubleshooting Distributed Cache in SharePoint Server 2013

The Distributed Cache plays an important role in SharePoint Server 2013 as it’s a key component for performance and caching. Distributed Cache is not a SharePoint service, it’s a standalone service called AppFabric 1.1 for Windows Server. SharePoint Server 2013 requires Windows Server App Fabric and the App Fabric 1.1 CU 1 (KB 2671763) to be installed .It takes care and improves the performance of the following features in SharePoint Server 2013:

  • Authentication
  • Newsfeeds
  • OneNote client access
  • Security Trimming
  • Page load performance

It’s always quite comfortable to manage Distributed Cache in SharePoint Server 2013 using PowerShell and the same applies while troubleshooting it also .This articles discusses on the useful PowerShell commands that can be used to troubleshoot Distributed Cache service in SharePoint Server 2013.

                     Command                    Explanation
                  Use-CacheCluster This is used to enable cache administration via PowerShell.
                  Get-CacheHost This would get you the list of every server in the cluster as well as the state of the service on that server.
      Get-CacheHostConfig <HostName> <Port> This would give you the general configuration details about a specific host in the cache cluster. All Windows Server AppFabric cache hosts use TCP/IP to communicate with each other and support the cache cluster. The SharePoint distributed cache is an AppFabric cache behind the scenes and  it uses the default AppFabric ports for server to server communication. These ports should be allowed through your firewalls for the cacheservice  to function correctly.
           Get-CacheAllowedClientAccounts This would tell which accounts/groups have rights to connect to the cache cluster as clients. This seems to be the standard configuration in SharePoint 2013.
                   Get-Cache Gets a listing of all the default caches in the farm. All caches have the Id (Guid) of the farm appended to the name.
       Get-CacheConfig <CacheName> Gives you the details about a specific cache instance
         Restart-CacheCluster This will restart the distributed cache service on all servers in the cluster and it will also clear the contents of the cache.
  Stop-SPDistributedCacheServiceInstance -Graceful This will stop the distributed cache service on an individual machine. The Graceful parameter will allow the cache service to migrate cached items to another host in the cluster.
 Remove-SPDistributedCacheServiceInstance Removes a cache host from the cluster. The best practice is to stop the cache service before you remove it.
  Add-SPDistributedCacheServiceInstance This command will add the cache host back to the cluster. If there is more than one host in the cluster, it will take a few minutes for the service to start and for any cached items to be synchronized to the new host.
   Get-CacheClusterHealth  Returns health statistics for all of the named caches in the cache cluster.
    Clear-CacheLogging  This command is used to disable all logging for the current admin
    Get-CacheStatistics Gives the statistics for a Cache or for a Cache Host.
     Start-CacheHost This would start the Caching Service on the specified cache host. If no cache hosts are up in the cache cluster, use the Start-CacheCluster command instead
     Stop-CacheCluster Stops the Caching Services on all cache hosts in the cluster.
    Stop-CacheHost Stops the specified cache host service.
   Test-CacheConfigAvailability Tests the connection with the cache cluster configuration store. This command will throw an exception if the connection fails.

In addition to the commands listed above there are couple of other things which you’re supposed to know while troubleshooting Distributed Cache Service/App Fabric.

  1. Query AppFabric for Caching Servers/Statuses :

To get the list of servers that AppFabric thinks there should in the cluster run “Get-CacheHost” (use “Use-CacheCluster” if necessary). This command gives us the list of the servers and also their availability status as far as AppFabric’s concerned.

  1. Query SharePoint for Caching Servers/Statuses :

To do the same for SharePoint, run:

Get-SPServiceInstance | ? {($_.service.tostring()) -eq “SPDistributedCacheService Name=AppFabricCachingService”} | select Server, Status

This will give you the same kind of data but from SharePoint perspective.  Make sure all the servers show the status as “Online” but more importantly that both SP & AF have the same names between them. If you see “cacheHostInfo is null” somewhere then it’s quite likely there’s a mismatch here.

What if one or more App Fabric Service Instance is disabled?

Run the below mentioned PowerShell command …..

Get-SPServiceInstance | ? {($_.service.tostring()) -eq “SPDistributedCacheService Name=AppFabricCachingService”} | select Server, Status

If any status shows as “disabled” then we have a problem and in that case please perform the below mentioned steps:

  1. Remove the service-instance (see above).
  2. Try re-adding it with Add-SPDistributedCacheServiceInstance
  3. Verify the new service-instance is “online”.

If for some reason Add-SPDistributedCacheServiceInstance doesn’t give you a healthy endpoint, try running Remove-SPDistributedCacheServiceInstance then Add-SPDistributedCacheServiceInstance on the server in question. If you still can’t get a healthy endpoint then it needs some serious consideration.

 

Command to Stop and Start the Distributed Cache service:

To start the Distributed Cache service by using Windows PowerShell:

At the Windows PowerShell command prompt, run the following command:

$instanceName =”SPDistributedCacheService Name=AppFabricCachingService”

$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}

$serviceInstance.Provision()

To stop the Distributed Cache service by using Windows PowerShell :

At the Windows PowerShell command prompt, run the following command:

$instanceName =”SPDistributedCacheService Name=AppFabricCachingService”

$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}

$serviceInstance.Unprovision()

Quick Edit option not working on SharePoint List:

This post discusses on a known issue where the “quick edit “option is greyed out in a “SharePoint custom list”. Please note that the contents discussed on this post  only applies for a “SharePoint custom list “ , this may or may not be true for the other list types in SharePoint .

0

Reasons why the quick edit option is greyed out:

While there can be couple of reasons for this option to be disabled/greyed out in a SharePoint List , the below mentioned one’s are the known possibilities and its always suggested to go and take a look at this when the “quick edit “ option is greyed out in a SharePoint custom List .

  1. The “Quick Edit “ option not being turned on under “Advanced settings” option in “List settings “ .
  2. The list has “grouping “enabled and this will disable the “quick edit “option.
  3. The “Allow individual item “check-box not being checked on “Tabular view “.

Now given these reasons, let’s take a look at how to fix them ….

  1. The “Quick Edit “ option not being turned on under “Advanced settings” option in “List settings “ 

1. Go to list settings –> Advanced settings

2. On Advanced settings you will have an option as shown below .Make sure this is set to “ Yes “

1

 2.   The list has “grouping “enabled and this will disable the “quick edit “option.

           If the list has “ grouping “ enabled then the quick edit option will not be displayed and in order to fix this you need to remove the “ grouping “ option from the list .

1. Go to “Modify view “option in the top ribbon interface as shown below and click on it.

2

2.  Once you’re on the “Modify view “ screen ,please scroll all the way down to “ Group By” and make sure that all the options are set to “ None “ here .

3

3. By any chance if you see any “group by “settings made here, please remove that for the “quick edit” option to work.

3.  The “Allow individual item “checkbox not being checked on “Tabular view “.

1. Go to the “Tabular view “option under “Modify view “and make sure that the “Allow individual item check-box “is checked.

4

Things to know about SharePoint Hybrid Search

Things to know about SharePoint Hybrid Search:

This post is mainly intended for those who want to understand about those services that can go Hybrid on SharePoint Server 2013 and I’ll be mainly discussing specifically about “SharePoint Server Hybrid search” here ….

The below mentioned SharePoint services can go hybrid:

  1. One drive for business
  2. SharePoint Search
  3. Business Connectivity service
  4. Duet for enterprises

 TechNet link for Hybrid SharePoint Services: _ https://technet.microsoft.com/en-us/library/dn197168.aspx

Now as mentioned before I’ll be discussing about “SharePoint Hybrid search” alone in this post and will be discussing about other SharePoint services that can go hybrid in a different post.

I’m going to keep this post simple by discussing only about what “SharePoint Hybrid search” is all about and the different topologies it has. The configuration part will be discussed on an upcoming new post.

What is SharePoint Hybrid Search?

To put it in simple words the term “Hybrid “here refers to using both on-premises + office 365 (SharePoint online) in your SharePoint deployment .If you have an environment where both your SharePoint server and office 365 (i.e. SharePoint Online) is integrated then it’s likely to be called as a “Hybrid SharePoint environment “.

Different topologies available in SharePoint Hybrid search:

There are three different topologies to speak about that are available for configuring SharePoint Hybrid search and it’s up to you as a SharePoint administrator to choose the right topology that suits the business requirement .

The 3 different topologies are …..

  1. One-way outbound search
  2. One-way inbound search
  3. Two way (bidirectional) –> (I’m not sure if this is supported by Microsoft as of now .However I’ve discussed about this method also )

One-way outbound search:

   In this model the user executes a search query in the SharePoint on-premises search center site and the query component looks for the results from the SharePoint on-premises site as well as from Office 365 and displays it for the user in the search results .

out

Note: The users should SharePoint online license assigned to them to be able to get the search results from SharePoint Online.

One-way inbound search:

     In this model the user executes a search query in the SharePoint online search site and the query component looks for the results from the SharePoint online sites as well as from SharePoint on-premises site and displays it for the user in the search results.

inbound

Note: The users should SharePoint online license assigned to them to be able to get the search results from SharePoint Online.

Two-way (bidirectional) topology:

    The name speaks for itself. In this model the user will be able to execute a search query in the SharePoint on-premises search site and get results from SharePoint server as well as from Office 365 (i.e. SharePoint online). Similarly, a user who executes a search query in SharePoint online will be able to get search results from SharePoint online as well as from SharePoint Server.

bi

Note: The users should SharePoint online license assigned to them to be able to get the search results from SharePoint Online.

End user experience in the search center:

The below illustration shows how a user will see the results in the search center when his SharePoint environment is configured for Hybrid search ….

ue

Search model for a Hybrid-search environment:

qf

Also, if you haven’t gone through the video in the link below, I highly recommend you to take a look at this to understand about SharePoint server Hybrid search and how it works :

https://channel9.msdn.com/Events/SharePoint-Conference/2014/SPC320