An Error Occurred While Enumerating
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more an error occurred while enumerating through a collection more data is available about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users an error occurred while enumerating through a collection access is denied Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping an error occurred while enumerating through a collection collection was modified each other. Join them; it only takes a minute: Sign up UserPrincipals.GetAuthorizationGroups An error (1301) occurred while enumerating the groups. After upgrading to Server 2012 Domain Controller up vote 20 down vote favorite 5 Research: Similar Issue with workaround,
An Internal Error Occurred While Enumerating Backup Sets Server 2008
but not actual solution to existing problem Similar issue pointing to Microsoft End Point update as culprit The above links are the most suited to my problem, I have also viewed every similar question listed by Stack Overflow upon creating this post, and only the above referenced questions fit my issue. Background: I have been using UserPrincipal.GetAuthorizationGroups for permissions for specific page access running IIS 7.5 on Server 2008 R2 in a C#.NET 4.0 web forms site an error occurred while trying to enumerate your resources for 2 and a half years. On May 15 2013 we removed a primary Domain controller running Server 2008 (not r2) and replaced it with a Server 2012 Domain Controller. The next day we started receiving the exception listed below. I use Principal Context for Forms Authentication. The username/pass handshake succeeds and the auth cookie is properly set, but the subsequent Principal Context call that also calls UserPrincipal.GetAuthorizationGroups fails intermittently. We've resolved a few BPA issues that appeared in the Server 2012 Domain Controller but this has yet to resolve the issue. I also instituted a cron that runs on two separate servers. The two servers will fail at Group SID resolution at different times though they are running the same code base. (A dev environment and production environment). The issue resolves itself temporarily upon web server reboot, and also on the dev server it will resolve itself after 12 hours of not functioning. The production server will usually stop functioning properly until a reboot without resolving itself. At this point I am trying to refine the cron targeting specific Domain Controllers in the network as well as the new DC and using the standard LDAP query that is currently failing to yield more targeted exception times. Thus far we've found on one web server that there is no pattern to the days at which it fails, but it
26 0 Sign into vote ID 522539 Comments 9 Status Active Workarounds 2 Type an error occurred while applying security information to failed to enumerate Bug Repros 18 Opened 12/30/2009 1:04:06 AM Access Restriction
An Error Occurred While Applying Security Information To Failed To Enumerate Objects
Public Description Error "An error occurred while enumerating the groups. The group could not
Citrix An Error Occurred While Trying To Enumerate Your Resources
be found" occurs when calling Principal.GetAuthorizationGroups method.
Here is the code snippet:
Collection
for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the http://sharepoint.stackexchange.com/questions/47672/powershell-an-error-occurred-while-enumerating-through-a-collection workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us SharePoint Questions Tags Users Badges Unanswered Ask Question _ SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute: Sign up error occurred Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Powershell An error occurred while enumerating through a collection up vote 1 down vote favorite 1 I have created the below powershell to loop through all my PWA sites and create a new view. error occurred while The script checks if the view already exists and then it checks if the new view has been set to the default view, if the new view is the default, it amends the default back to the first ([0]) view in the views array. I am receiving the "enumerating through a collection" error as I understand you cant edit the current collection, I am quite new to powershell and having looked at answers I dont fully understand how I can amend the code to prevent this error, can anyone help please? The error occurs when it tries to update the defaultview within the defaultViewCheck function: function defaultViewCheck { Param ($dvweb, $dvlist) #Check SSIS Package default $newList = $dvweb.Lists.item($dvlist.ID) $viewCheck = $newList.Views["SSIS Package View - Do not Touch"] if ($viewCheck.DefaultView = $true) { write-host $viewCheck "is set to default" # set value 0 in the list array to the default view $defaultView = $dvlist.Views[0] ## Set the default View $view = $newList.Views[$defaultView] $view.DefaultView = $true $view.Update() write-host $defaultView