Click here to Skip to main content
12,253,599 members (53,843 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » Howto » Downloads


54 bookmarked

ASP.NET - Forms authentication user impersonation

, 12 Nov 2009 CPOL
An ASP.NET class and accompanying control for providing application support users with a 'login as user ...' function the right way.
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="ASP.Net FormsAuthentication user impersonation" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h3>User impersonation control</h3>
    <p><asp:Button ID="ImpersonateButton" runat="server" Text="Impersonate Alice" OnClick="Impersonate" /></p>
    <h3>Alice's private page</h3>
    <p><asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Private/Alice.aspx" Text="Private/Alice.aspx" /></p>

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

Christ Akkermans
Netherlands Netherlands
Developer at AlertA contractbeheer.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160426.1 | Last Updated 13 Nov 2009
Article Copyright 2009 by Christ Akkermans
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid