Click here to Skip to main content
13,559,281 members
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads


44 bookmarked
Posted 9 Oct 2011
Licenced CPOL

Bypass Forms Authentication to Use Active Directory User Authentication in ASP.NET

, 9 Oct 2011
This article describes how to keep form based and active directory user based authentication process in parallel in ASP.NET.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserList.aspx.cs" Inherits="ActiveDirectoryAuthentication.UserManager_UserList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" 
                <asp:BoundField DataField="UserName" HeaderText="UserName" 
                    SortExpression="UserName" />
                <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                <asp:CheckBoxField DataField="IsApproved" HeaderText="IsApproved" 
                    SortExpression="IsApproved" />
        <asp:SqlDataSource ID="SqlDataSourceForUser" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ADUSERAUTHCS %>" 
            SelectCommand="select u.UserName,m.Email,m.IsApproved from aspnet_Users u left join aspnet_Membership m on u.UserId=m.UserId">

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Fazlur Rahman
Technical Lead Ominto Inc
United Arab Emirates United Arab Emirates
I am Bachelor in CSE from Khulna University of Engineering & Technology,Bangladesh. I have more than 11 years experience in software design & development, data analysis & modeling, project management and currently working in a software company in Dubai,UAE as a Lead Software Engineer. I am MCAD(Microsoft Certified Application Developer) certified since 2005. Please feel free to contact with me at

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.180515.1 | Last Updated 9 Oct 2011
Article Copyright 2011 by Fazlur Rahman
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid