1

When calling the method:

Microsoft.SharePoint.Utilities.SPUtility.GetPrincipalsInGroup(SPWeb web, String input, Int32 maxCount, Boolean& reachedMaxCount)

I get the following stack trace:

System.InvalidOperationException: Operation is not valid due to the current state of the object.
at Microsoft.SharePoint.Administration.Claims.SPClaimsAuthRoleProvider.GetUsersInRole(SPWeb web, String roleName, Int32 maxCount, Boolean& reachedMaxCount)
at Microsoft.SharePoint.Utilities.SPUtility.GetPrincipalsInGroup(SPWeb web, String input, Int32 maxCount, Boolean& reachedMaxCount)

This particular code is running remotely at a customer site, so I am unable to attach a debugger. This works locally and in staging outside of the customer's site. The local site, staging and the customer's production environment all use Claims-Based-Authentication and Windows Authentication.

Any ideas as to what could cause this exception?

0

Add following entry in web.config of your site.

<appSettings>
    <add key="aspnet:MaxHttpCollectionKeys" value="5001" />
</appSettings>

This should resolve your issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.