You may receive the following error when trying to view an Excel chart or graph on a website using Excel Services in SharePoint:
The maximum number of allowed sessions per user has been exceeded. The operation cannot be completed.
To fix this error, go to SharePoint Central Administration > Application Management > Service Applications > Manage service applications > Excel Services application > Global Settings. In the Session Management section, increase the value for Maximum Sessions Per User.
If this does not fix the error, you may be using anonymous authentication, for example when your site is on a public website. For the Maximum Sessions Per User setting, a user is an authenticated user. When anonymous access is enabled in SharePoint, all the users hitting the site are anonymous users, which maps to a single internal account that is authenticated to retrieve the data. So the maximum sessions setting applies to the same pool of sessions for all users.
If you are using anonymous authentication, you will see the following error in the SharePoint ULS log:
SessionManager.CheckAndUpdateSessionsPerUser: Throwing MaxSessionsPerUserExceeded SessionException. User=NT AUTHORITY\ANONYMOUS LOGON Count=25
There is a separate setting for anonymous users that is not exposed in the Excel Services settings in the SharePoint Central Administration GUI. The setting is called SiteCollectionAnonymousSessionsMax. To modify the setting, go to Start > Programs > Microsoft SharePoint > SharePoint Management Shell. Run the following command:
Get-SPExcelServiceApplication | format-list *
Look for the SiteCollectionAnonymousSessionsMax setting, It will most likely be set to 25 as this is the default setting. Also note the value of DisplayName which refers to the name of the Excel Services application. To change the session setting, for example to 500 sessions, run the following command, replacing DisplayName with the DisplayName value:
Set-SPExcelServiceApplication -identity DisplayName -SiteCollectionAnonymousSessionsMax 500
You may need to restart IIS. After making this change, users will not receive the error and should be able to view the Excel chart or graph successfully.