CSS SQL Server Engineers

This is the official team Web Log for Microsoft Customer Service and Support (CSS) SQL Support. Posts are provided by the CSS SQL Escalation Services

Could not load file or assembly System.EnterpriseServices

Could not load file or assembly System.EnterpriseServices

  • Comments 2

While setting up a SharePoint 2010 environment with Reporting Services 2012, I hit an interesting error. To explain my setup, this is a Classic Mode Auth site with Kerberos enabled for the site.

I had verified that I had the proper accounts configured and Kerberos Configuration in place. Also, knowing that even in a Classic Mode site, Claims is still going to be used now with RS 2012 in SharePoint Integrated mode as we are a SharePoint Shared Service.

I have my Claims to Windows Token Service (C2WTS) set to a Domain account, and I verified it was delegating to the proper services. The claims service account was also in the local Admins group on the SharePoint Server. This is because I've found that it is needed to be in the Local Admin group. I haven't found what specific right is required yet to avoid the Local Admin group.

When trying to create a Data Source for Reporting Services, when it click on Test Connection, I got the following error:

clip_image001

Within the SharePoint ULS log, we see the following under the "Report Server Processing" category:

Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source ''. ---> System.IO.FileLoadException: Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542) File name: 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ---> System.Runtime.InteropServices.COMException (0x80070542): Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)

0x80070542 = ERROR_BAD_IMPERSONATION_LEVEL

Of note, I got the same error from a Claims Mode Auth site.

While setting this up, I purposefully did incremental steps to see what was really needed to get this working. As mentioned above, I had the Claims Service Account within the Local Admin group as I wanted to see if that would be all that is needed. Apparently not. I know we have documentation indicating that you also need the local policy right "Act as part of the Operating System", but I didn't include that out right.

The issue here is the fact that the Claims Service Account is not in the "Act as part of the Operating System" policy. I added the claims service account to that policy right:

clip_image002

After that, I restarted the C2WTS Windows Service and performed an IISReset. Restarting just the C2WTS Windows Service was not enough to correct the error. Possibly due to caching.

clip_image003

 

Adam W. Saxton | Microsoft Escalation Services
http://twitter.com/awsaxton

Leave a Comment
  • Please add 2 and 8 and type the answer here:
  • Post
  • Hi Adam,

    Thanks for sharing this with us. I am also facing the same issue now. On what server do you think I need to add this Claims service account. We had not setup this account too. Can we use any other service accounts for this and on what server do i need to set up. This would be helpful.

    Thanks,

    Ramesh

  • Hi Adam,

    I have the similar setup as you with SharePoint 2010 and SQL 2012 Reporting Services Integration. Except, the Claims to Windows Token service is running under the Local Service account in my farm.

    I am encountering the same error message as the one you are in the post above.

    Would you happen to know or have more information about this issue?

    Thanks,

Page 1 of 1 (2 items)