title: The type or namespace name 'DirectoryServices' does not exist in the namespace?
body: <blockquote>
    <p>CS0234: The type or namespace name 'DirectoryServices' does not exist
    in the namespace 'System' (are you missing an assembly reference?)</p>
  </blockquote>
  
  <p>This page was working fine,show records from directly services with no error. but now it gives the above error. </p>
  
  <pre><code> &lt;asp:GridView ID="gvUsers" runat="server" AutoGenerateColumns="false" DataSourceID="odsUsers"
                                      AllowPaging="true" AllowSorting="true" Width="100%"&gt;
  &lt;Columns&gt;
   &lt;asp:TemplateField HeaderText="User Name"&gt;
   &lt;ItemTemplate&gt;
  
  &lt;%#((System.DirectoryServices.DirectoryEntry)Container.DataItem).Properties["userPrincipalName"].Value%&gt;
  
     &lt;/ItemTemplate&gt;
     &lt;/asp:TemplateField&gt;
  /Columns&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>Project builds successfully but when I open the page then it gives error</p>