title: Custom Windows Active Directory Authentication in ASP.net C# page
body: <p>I sort of want to be able to do mixed windows and forms authentication.</p>
  
  <pre><code>//I want to check the browser the user is using
  If(IE || chome)//I know IE and chrome can authenticate without a popup login box
  {
      //check windows authentication
      if(generic AD account || AD user doesn't have permissions for this application)
      {
          //Redirect to login page
      }
      else
      {
          //Redirect to main page
      }
  }
  elsif(IPad || android || Firefox)
  {
      //Redirect to login page
  }
  </code></pre>
  
  <p>Is there a way to create some custom code to get windows AD authentication with javascript or can I create a custom ashx page to check authentication?</p>