Hi, Playing around with active directory trying to get Windows group based on userid. When run locally the code that follows works and prints out the information.
DirectoryEntry root = new DirectoryEntry("LDAP://somerootl"); // Create Directory Searcher DirectorySearcher searcher=new DirectorySearcher(root); // Set Filter searcher.Filter = "(SAMAccountName=someusername)"; // Add Properties To Look For searcher.PropertiesToLoad.Add("memberOf"); // Find All that Match SearchResult result = searcher.FindOne(); Response.Write(result.Properties["memberOf"].Count); Response.Write(result.Properties["memberOf"][0]); When I run on my Windows 2000 Advanced Server I get the following exception: Server Error in '/TestActiveDirectoryC' Application. ---------------------------------------------------------------------------- ---- Handling of this ADSVALUE type is not yet implemented (type = 0xb). Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NotImplementedException: Handling of this ADSVALUE type is not yet implemented (type = 0xb). Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [NotImplementedException: Handling of this ADSVALUE type is not yet implemented (type = 0xb).] System.DirectoryServices.ResultPropertyValueCollection.get_Item(Int32 index) +111 TestActiveDirectoryC.WebForm1.Page_Load(Object sender, EventArgs e) System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +29 System.Web.UI.Page.ProcessRequestMain() +724 Any help would be appreciated Jim You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.