Arithmetic operation resulted in an overflow in
-
Wednesday, May 11, 2011 7:21 AM
We have library which read AD keys, sometimes function throwing exception.
Questions: Why internal Microsoft code throw System.OverflowException for AD? How find user can be related to overflow?
Why System.OverflowException this error is not documented in MSDN ?
If there is a bug in System.DirectoryServices or we did something wrong?
System.OverflowException: Arithmetic operation resulted in an overflow. at System.DirectoryServices.SearchResultCollection.ResultsEnumerator.GetCurrentResult() at System.DirectoryServices.SearchResultCollection.ResultsEnumerator.get_Current() at System.DirectoryServices.SearchResultCollection.ResultsEnumerator.System.Collections.IEnumerator.get_Current() at Iit.ApplicationRoleLookup.ActiveDirectoryHelper.<FindUserGroupsInAd>d__18.MoveNext() in d:\Builds\25\709\Sources\Source\ApplicationRoleLookup\ActiveDirectoryHelper.cs:line 715 at Iit.ApplicationRoleLookup.ActiveDirectoryHelper.<FindUserAppAccInAd>d__c.MoveNext() in d:\Builds\25\709\Sources\Source\ApplicationRoleLookup\ActiveDirectoryHelper.cs:line 595 at Iit.ApplicationRoleLookup.RoleFinder.<FromUserName>d__1f.MoveNext() in d:\Builds\25\709\Sources\Source\ApplicationRoleLookup\RoleFinder.cs:line 1225 at Iit.FrontOffice.Authorization.AuthorizationServer.GetPolicies() at Iit.FrontOffice.Authorization.AuthorizationBase.GetOperations() in d:\builds\34\1405\Sources\Source\Modules\Authorization\Iit.FrontOffice.Authorization.Base\AuthorizationBase.cs:line 133 at Iit.FrontOffice.Authorization.ServerAuthorizationService.GetOperations() at
or
Error: System.OverflowException: Arithmetic operation resulted in an overflow. at System.DirectoryServices.SearchResultCollection.ResultsEnumerator.GetCurrentResult() at System.DirectoryServices.SearchResultCollection.ResultsEnumerator.get_Current() at System.DirectoryServices.SearchResultCollection.ResultsEnumerator.System.Collections.IEnumerator.get_Current() at Iit.ApplicationRoleLookup.ActiveDirectoryHelper.<FindUserGroupsInAd>d__18.MoveNext() in d:\Builds\25\709\Sources\Source\ApplicationRoleLookup\ActiveDirectoryHelper.cs:line 715 at Iit.ApplicationRoleLookup.ActiveDirectoryHelper.<FindUserAppAccInAd>d__c.MoveNext() in d:\Builds\25\709\Sources\Source\ApplicationRoleLookup\ActiveDirectoryHelper.cs:line 595 at Iit.ApplicationRoleLookup.RoleFinder.<FromUserName>d__1f.MoveNext() in d:\Builds\25\709\Sources\Source\ApplicationRoleLookup\RoleFinder.cs:line 1225
RUV
All Replies
-
Friday, May 13, 2011 7:33 AMModerator
You can find the document of OverflowException class over here.
From the callstack, it seems that you're loop through users, and perform some actions for each user; To find out related user name, you may print user name in the for...each… block, the last user name printed before the exception happen is what you want.
Eric Yang [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

-
Friday, May 13, 2011 1:26 PM
But if OverflowException is throwed from inside of Microsoft function, in my example from
System.DirectoryServices.SearchResultCollection.ResultsEnumerator.System.Collections.IEnumerator.get_Current()Why this is not documented in MSDN?
It looks like bug in tem.DirectoryServices.SearchResultCollection.ResultsEnumerator as it is not make sense to have Overflow inside get_Current..I suggest it must be Collection was modified error or something a little bit more understandable, as I clearly can not even imagine why function was failed..
RUV -
Tuesday, June 07, 2011 8:39 AM
++++
RUV -
Friday, March 02, 2012 8:13 PMI have the same issue. Please help. Thanks.
-
Friday, August 31, 2012 7:19 PM
I am strucked in the same issue can you please provide me the solution please .
thanks in advance
Thanks, Manoj
-
Friday, August 31, 2012 8:46 PMI suspect you didn't get any results or moved past the end of the returned results. The error could also occur if you didn't have permission to access the directory. The Net library as a protection mechanism only allow you program to access a limited memory space. So if you exceed the boundary of the memory space you are allowed an overflow error can occur because a subtraction occurs to comapre the address you are accessing and the upper boundary of memory you have permission to access.
jdweng
-
Sunday, September 02, 2012 8:05 AM
Roman,
Please checkout this post:
http://social.technet.microsoft.com/Forums/eu/scoscip/thread/c8929889-9e7f-427f-bb89-1464b2c68d49
Regards, http://www.shwetalodha.blogspot.in/

