title: Asp.Net Role-based authentication using Security groups in Active Directory
body: <p>I am attempting to do something simple (I thought) - securing my application using roles-based security using Active Directory groups in our Domain.</p>
  
  <p>Specifically, I need to show/hide items on a page depending upon whether the currently logged in user is part of <code>domain\groupA</code> in Active Directory. For some reason, it is difficult finding information on using Active Directory for this. Everything I seem to find goes into details of using forms-based authentication using roles, or it uses a DB to store the information.</p>
  
  <p>All I want to do is use our already outlined security structure in our Active Directory. Can someone please explain what I need?</p>
  
  <p>Do I need:</p>
  
  <ol>
  <li><code>&lt;roleManager enabled="true"/&gt;</code> in <code>web.config</code></li>
  <li><code>&lt;allow roles ="domain\groupA"/&gt;</code> in <code>web.config</code></li>
  <li>IIS set to windows authentication</li>
  <li><code>if (User.IsInRole(@"domain\groupA")){ //do stuff }</code> in my page?</li>
  </ol>
  
  <p>What else am I missing? Anything? 'cause its not working. heh.</p>
  
  <p>Thanks all for your help.</p>