title: Cannot load System.DirectoryServices.AccountManagement in ASP.NET VB site
body: <p>I have been working on adding Active Directory functionality to an already existing ASP.NET website following this guide by Microsoft: <a href="http://support.microsoft.com/kb/326340" rel="nofollow noreferrer">http://support.microsoft.com/kb/326340</a>. It's been a long process, but what I'm stuck on now is not being able to access the AccountManagement class to use certain functions such as "GetGroup()".</p>
  
  <p>I can access DirectoryServices just fine, but not Account Management. When I use the following code to test the reference:</p>
  
  <pre><code>Response.Write(System.DirectoryServices.AccountManagement.Principal.GetGroups())
  </code></pre>
  
  <p>I get this error: BC30456: 'AccountManagement' is not a member of 'DirectoryServices'.</p>
  
  <p>I have already added this assembly tag to the web.config page:</p>
  
  <pre><code>&lt;add assembly="System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /&gt;
  </code></pre>
  
  <p>Also I am importing both namespaces:</p>
  
  <pre><code>&lt;%@ Import Namespace="System.DirectoryServices" %&gt;
  &lt;%@ Import Namespace="System.DirectoryServices.AccountManagement" %&gt;
  </code></pre>
  
  <p>And this is my version info that shows on the error page:</p>
  
  <blockquote>
    <p>Version Information: Microsoft .NET Framework Version:4.0.30319;
    ASP.NET Version:4.0.30319.34237</p>
  </blockquote>
  
  <p>I'm editing this website in VS 2010. What am I missing and how can I get AccountManagement added here? Am I not importing it properly, or is there somewhere I can check to see if there is a missing .dll?</p>