title: Integrate app with active directory Light Service
body: <p>Now I am trying to build a .net app(C#), I trying to integrate my app with windows active directory to authenticate user and password in AD, since its still in development. </p>
  
  <p>So, I decided to use Active Directory Lightweight Directory Services as substitute of AD, but the problem is my PC does not have any domain, it's a local computer. </p>
  
  <p>I really have no idea what I am going to put in my connection string. can anyone help me? and put some examples pls, thank you. any help will be great.. by the way my PC using windows 7, and I am using .net 4.5 / MS VS 2012.</p>
  
  <p>Here is some of my code</p>
  
  <p>C# :     </p>
  
  <pre><code>string connection =  ConfigurationManager.ConnectionStrings["ADConnection"].ToString();
  DirectorySearcher dssearch = new DirectorySearcher(connection);
  dssearch.Filter = "(sAMAccountName=" + txtusername.Text + ")";
  SearchResult sresult = dssearch.FindOne();
  DirectoryEntry dsresult = sresult.GetDirectoryEntry();
  lblfname.Text = dsresult.Properties["givenName"][0].ToString();
  lbllname.Text = dsresult.Properties["sn"][0].ToString();
  lblemail.Text = dsresult.Properties["mail"][0].ToString();
  </code></pre>