Tuesday, November 25, 2014

ULS log Event ID 5240 “There was an error in communicating with Excel Calculation Services”

Issue Description

Recently I came across this issue where some of the end users were getting an error message when they tried to open an Excel file in SharePoint in the browser.

Unable to process the request.
Wait a few minutes and try performing this operation again.

- On checking the ULS logs I got the below error message.
ULS log Event ID 5240 “There was an error in communicating with Excel Calculation Services”

- On checking the Event Viewer on the server , there was the below error.
Event 2159, SharePoint Server
Event 5240 (Excel Services Application) of severity Error occurred 20 more time(s) and was suppressed in the event log


The Excel Services Application server computer is in a non-valid state and may need to be restarted.


Most of the online articles were asking me to restart the Central Administration server.I did not want to do that and found a different fix.

Identify the application pool running the Excel Services service application (from IIS) and Recycle it.

1) Start –>Run –> inetmgr

2) Under the Sites click on SharePoint Web Services. This will list down the Services in SharePoint.

3) Click on each GUID –> Change the view from Features View to Content View

4) On finding ExcelService.asmx -> Right click that web service -> Manage Application -> Advanced Settings.

5) Identify the Application Pool (make a note of this).

6) Now in IIS –> Application Pools –> choose the Application Pool you noted down in previous step   -> Recycle (recycle the application pool).

Monday, November 24, 2014

SharePoint Shell Admin Access

SharePoint Shell Admin Access
To execute a command in the SharePoint 2010 Management Shell, the user should open the Management Shell on a SharePoint 2010 server. To execute commands, the user must have the necessary privileges to the SharePoint object model and to the SharePoint databases. When you are working with SharePoint objects, connections to the database are generally created with the permissions of the current user. 

In order to use Windows PowerShell for SharePoint , a user must be a member of the SharePoint_Shell_Access role on the configuration database and a member of the WSS_ADMIN_WPG local group on the computer where SharePoint is installed. 

You can use SPShellAdmin for configuring a user’s privileges and security. Here’s how. 
To run this cmdlet to add a user to the SharePoint_Shell_Access role, you must have membership in the securityadmin fixed server role on the SQL Server instance, membership in the db_owner fixed database role on all affected databases, and local administrative permission on the local computer.

1. To list Shell administrators

2. To add a user as a Shell administrator
Add-SPShellAdmin -UserName <user name> -Database <database name> 

- If you specify only the user, the user is added to the role for the farm configuration database.

- If you use the database parameter, the user is added to the role on the farm configuration database, the Central Administration content database, and the specified database. Using the database parameter is the preferred method because most of the administrative operations require access to the Central Administration content database.

$db = Get-SPContentDatabase -Site http://sharepointsiteurl/
Add-SPShellAdmin -UserName "domain\user name" -Database $db

3. To remove a user from Shell Admin
Remove-SPShellAdmin -UserName <user name> -Database <database name> 

Wednesday, November 19, 2014

Deleting a SharePoint list through PowerShell

When SharePoint lists are corrupted and you are unable to delete them from UI, you can delete them from SharePoint PowerShell. If you want to force delete a SharePoint list using PowerShell, open SharePoint Management shell and run the below commands:

$web = Get-SPWeb -Identity http://sitename
$list = $web.Lists["corrupted list name"]
$list.AllowDeletion = $true

Monday, November 3, 2014

Error Message: Content Advisor Will Not Allow You to See This Site

Issue Description
When you attempt to access a Web page using Internet Explorer, Content Advisor may display the following error message:
Sorry! Content Advisor will not allow you to see this site.
The error message also indicates that the page has no rating.

This issue can occur when Content Advisor is enabled, but the "User can see sites which have no rating" option is disabled.

This is not a SharePoint issue. This issue is an Internet Explorer Browser issue.

Please refer to this KB article for the fix