Click here to Skip to main content
11,716,249 members (90,352 online)
   

C#

 
GeneralRe: Does backgroundWorker make code slower? Pin
MichCl29-Jan-13 2:18
memberMichCl29-Jan-13 2:18 
GeneralRe: Does backgroundWorker make code slower? Pin
PIEBALDconsult29-Jan-13 3:16
memberPIEBALDconsult29-Jan-13 3:16 
QuestionDoes backgroundWorker make code slower? Pin
MichCl28-Jan-13 9:35
memberMichCl28-Jan-13 9:35 
AnswerRe: Does backgroundWorker make code slower? Pin
Pete O'Hanlon28-Jan-13 9:51
protectorPete O'Hanlon28-Jan-13 9:51 
GeneralRe: Does backgroundWorker make code slower? Pin
MichCl29-Jan-13 2:19
memberMichCl29-Jan-13 2:19 
GeneralRe: Does backgroundWorker make code slower? Pin
MichCl29-Jan-13 4:02
memberMichCl29-Jan-13 4:02 
GeneralRe: Does backgroundWorker make code slower? Pin
Pete O'Hanlon29-Jan-13 4:12
protectorPete O'Hanlon29-Jan-13 4:12 
QuestionGroupPrincipalExt can not be used in a query against this store Pin
JD8628-Jan-13 8:18
memberJD8628-Jan-13 8:18 
I created a class so I can add extensions to the GroupPrincipal object but I am getting this error:

System.InvalidOperationException: Principal objects of type CloudPanel.AD.Custom.GroupPrincipalExt can not be used in a query against this store. at System.DirectoryServices.AccountManagement.ADStoreCtx.GetObjectClassPortion(Type principalType) at System.DirectoryServices.AccountManagement.ADStoreCtx.FindPrincipalByIdentRefHelper(Type principalType, String urnScheme, String urnValue, DateTime referenceDate, Boolean useSidHistory) at System.DirectoryServices.AccountManagement.ADStoreCtx.FindPrincipalByIdentRef(Type principalType, String urnScheme, String urnValue, DateTime referenceDate) at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable`1 identityType, String identityValue, DateTime refDate) at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, IdentityType identityType, String identityValue) at CloudPanel.AD.Custom.GroupPrincipalExt.FindByIdentity(PrincipalContext context, IdentityType identityType, String identityValue) at CloudPanel.Exchange.ExchPs.Get_DistributionGroup(String distinguishedname)


I don't really know why this isn't working since I have used this class before.

Here is a piece of the class I created (I didn't include all the DirectoryProperties since there are a bunch that I've added):

public class GroupPrincipalExt : GroupPrincipal
    {
        public GroupPrincipalExt(PrincipalContext context) : base(context) { }
        public GroupPrincipalExt(PrincipalContext context, string groupName) : base(context, groupName) { }
 
        public static new GroupPrincipalExt FindByIdentity(PrincipalContext context, string identityValue)
        {
            return (GroupPrincipalExt)FindByIdentityWithType(context, typeof(GroupPrincipalExt), identityValue);
        }
 
        public static new GroupPrincipalExt FindByIdentity(PrincipalContext context, IdentityType identityType, string identityValue)
        {
            return (GroupPrincipalExt)FindByIdentityWithType(context, typeof(GroupPrincipalExt), identityType, identityValue);
        }
 
        [DirectoryProperty("wWWHomePage")]
        public string WWWHomePage
        {
            get
            {
                if (ExtensionGet("wWWHomePage").Length != 1)
                    return null;
 
                return (string)ExtensionGet("wWWHomePage")[0];
            }
            set
            {
                this.ExtensionSet("wWWHomePage", value);
            }
        }
}

Here is how I am calling it:

using (PrincipalContext pc = new PrincipalContext(ContextType.Domain, "dc.******.local", "DC=*****,DC=local", ContextOptions.SimpleBind, "******\\Administrator", "*********"))
                {
 
                    GroupPrincipalExt group = GroupPrincipalExt.FindByIdentity(pc, IdentityType.DistinguishedName, distinguishedname);
                    if (group != null)
                    {
}
}

Any idea why this would be happening?
AnswerRe: GroupPrincipalExt can not be used in a query against this store Pin
Richard Deeming28-Jan-13 8:26
memberRichard Deeming28-Jan-13 8:26 
GeneralRe: GroupPrincipalExt can not be used in a query against this store Pin
JD8628-Jan-13 9:49
memberJD8628-Jan-13 9:49 
QuestionCheck if polygon is Inside another Pin
gilvani28-Jan-13 7:48
membergilvani28-Jan-13 7:48 
AnswerRe: Check if polygon is Inside another Pin
pt140128-Jan-13 8:05
memberpt140128-Jan-13 8:05 
GeneralRe: Check if polygon is Inside another Pin
gilvani28-Jan-13 23:03
membergilvani28-Jan-13 23:03 
AnswerRe: Check if polygon is Inside another Pin
Alan Balkany29-Jan-13 4:12
memberAlan Balkany29-Jan-13 4:12 
GeneralRe: Check if polygon is Inside another Pin
gilvani29-Jan-13 4:16
membergilvani29-Jan-13 4:16 
GeneralRe: Check if polygon is Inside another Pin
Alan Balkany29-Jan-13 4:22
memberAlan Balkany29-Jan-13 4:22 
QuestionProblems in retrieving HttpResponse content Pin
tiwal28-Jan-13 4:16
membertiwal28-Jan-13 4:16 
AnswerRe: Problems in retrieving HttpResponse content Pin
Richard Deeming28-Jan-13 5:06
memberRichard Deeming28-Jan-13 5:06 
GeneralRe: Problems in retrieving HttpResponse content Pin
tiwal28-Jan-13 23:02
membertiwal28-Jan-13 23:02 
QuestionAbout method TextWriter.Write() Pin
taibc27-Jan-13 23:52
membertaibc27-Jan-13 23:52 
AnswerRe: About method TextWriter.Write() Pin
BobJanova28-Jan-13 0:34
memberBobJanova28-Jan-13 0:34 
AnswerRe: About method TextWriter.Write() Pin
Richard MacCutchan28-Jan-13 0:37
mvpRichard MacCutchan28-Jan-13 0:37 
GeneralRe: About method TextWriter.Write() Pin
PIEBALDconsult28-Jan-13 3:28
memberPIEBALDconsult28-Jan-13 3:28 
AnswerRe: About method TextWriter.Write() Pin
taibc28-Jan-13 14:51
membertaibc28-Jan-13 14:51 
QuestionNotifyicon in C# website Pin
NickyRamshaw27-Jan-13 21:48
memberNickyRamshaw27-Jan-13 21:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.150901.1 | Last Updated 3 Sep 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid