Cannot Seem To Remove ApplicationGroupMember

Apr 1, 2009 at 1:12 PM
I'm trying to remove an AzManApplicationGroupMember from an AzManApplicationGroup programmatically.

I first tried:

 

IAzManSid azSID = new SqlAzManSID( sid );
IAzManApplicationGroupMember member = group.GetApplicationGroupMember( azSID );
member
.Delete();

 

This would delete the member and on subsequent gets of the group, the member was gone. But I was keeping the group in memory and would be accessing it's groups again without going to the database and it was still showing the ApplicationGroupMember as a member of the group.

So then I tried:

 

IAzManSid azSID = new SqlAzManSID( sid );
IAzManApplicationGroupMember member = group.GetApplicationGroupMember( azSID );
m_group
.Members.Remove( member.SID );
member
.Delete();

This had the same result as the first attempt, but again, it would not remove the ApplicationGroupMember from the internal "Members" Dictionary of the ApplicationGroup object.

What am I missing?

Could a "RemoveApplicationGroupMember" method be added to the AzManApplicationGroup class? If it were, what would the implementation of this method look like? This is essentially what I am needing.

Thanks.

 

Apr 1, 2009 at 11:16 PM

Hi,
Members of a Group Application / Store are cached in the Members collection.
To invalidate the cache, simply refresh the Application / Store Group ... just reading the Application / Store group again:

Application.GetApplicationGroup(IAzManSID).


Regards,

Andrea.