Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

GetGroupsUserInComponent "Thread was being aborted"

Created: 17 Jun 2012 | 3 comments

I'm not quite sure how to handle this exception.  I have a WF that when the user logs in it gets the AD groups for that user.  Sometimes the login errors out on getting the groups.  Not all the time, just some times.  Mostly it only happens if it’s the first time that user has logged in that day.  The AD server its hitting is in the same data center. Only down side to the query is I have to query the entire domain because the user IDs could be under any number of OUs.  So this could be a timeout issue.

Here is the log error from the WF server:

Application Name : MigrationConsole3
Process ID : 4036
Date :6/17/2012 1:29:28 PM
Log Level :Error
Log Category :LogicBase.Components.ActiveDirectory.GetGroupsUserInComponent
Machine Name : [myserver]
Message : 
System.Threading.ThreadAbortException: Thread was being aborted.
   at System.DirectoryServices.Interop.UnsafeNativeMethods.IAds.GetEx(String bstrName, Object& value)
   at System.DirectoryServices.PropertyValueCollection.PopulateList()
   at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName)
   at System.DirectoryServices.PropertyCollection.get_Item(String propertyName)
   at System.DirectoryServices.AccountManagement.Principal.ExtensionGet(String attribute)
   at LogicBase.Components.ActiveDirectory.ADGroup.GetProperty(String propName) in c:\build\projects\WF71MR2\components\LogicBase.Components.ActiveDirectory\ADGroup.cs:line 93
   at LogicBase.Components.ActiveDirectory.ADGroup.get_Email() in c:\build\projects\WF71MR2\components\LogicBase.Components.ActiveDirectory\ADGroup.cs:line 122
   at LogicBase.Components.ActiveDirectory.ADGroupInfo..ctor(ADGroup groupPrincipal) in c:\build\projects\WF71MR2\components\LogicBase.Components.ActiveDirectory\ADGroupInfo.cs:line 127
   at LogicBase.Components.ActiveDirectory.AbstractADComponent.FindOneGroup(PrincipalContext context, IdentityType type, String identityValue, Boolean notFoundException) in c:\build\projects\WF71MR2\components\LogicBase.Components.ActiveDirectory\AbstractADComponent.cs:line 961
   at LogicBase.Components.ActiveDirectory.GetGroupsUserInComponent.Run(IData data) in c:\build\projects\WF71MR2\components\LogicBase.Components.ActiveDirectory\GetGroupsUserInComponent.cs:line 71
 
Thoughts?

Comments 3 CommentsJump to latest comment

AnaMan's picture

The ThreadAbortException is usually thrown in workflow because of exceeded IIS limits for request length and execution time. This issue is especially observable during first execution of something beacause the system has no any cached data and request has to last much longer - longer then IIS allows.

These limits are defined in web.config files (for application, site or global in machine.config) inside section like this:

<configuration>

        <system.web>
                <httpRuntime executionTimeout="110" maxRequestLength="4096" />
        </system.web>

</configuration>

According to MSDN the default values for executionTimeout is 110 seconds.

If you application throws an exception just about 2 minutes after web request starts it's a good track. I my opinion you should start with reconfiguring executionTimeout parameter for you application.

masonje's picture

Those settings are not in the project web.comfig so I assume adding them should over write the server defaults. I'll let you know if this does the trick, thanks!

Vlastislav Drga's picture

Hi,

in my experience component throw some error when user belongs to group(s) in different domain.

Other possibility is that one of the groups has character / (slash) in name.

I don’t remember exact error codes, but in both cases I used to get errors.

I hope it will help,

Vlastik