I have developed a SharePoint 2010 Application Page app (basically it's an ASP.Net app that runs in SP 2010.) It contains calls into Active Directory to test if the user of the app is in certain groups, then it updates AD user accounts with some new data the user enters on a form... the app works fine when I run it on my local machine. When I attempt to deploy it (which I don't know what I'm doing, to be honest, I'm an ASP.Net developer brand new to SP 2010 development) the app fails with the exception:
[ArgumentNullException: Value cannot be null. Parameter name: identityValue] System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, String identityValue) +503612 System.DirectoryServices.AccountManagement.GroupPrincipal.FindByIdentity(PrincipalContext context, String identityValue)
I'm not sure what is going on here and I'm not sure how I am supposed to deploy an SP 2010 Application Page app to begin with... I've tried creating and installing the WSP with mixed results. I get it to work when I take out the calls into AD.
By the way the account I run under when developing has no special AD rights so I don't believe that is the issue... I connect to AD through code and hand it, programmatically, the username and pword to use to validate with. It works fine on my box (my boss is sick of hearing me say that....)