Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 893501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:13:58+00:00 2026-05-15T14:13:58+00:00

Is it possible to Impersonate a user when using Forms Authentication? The thing is

  • 0

Is it possible to Impersonate a user when using Forms Authentication?

The thing is that I want an external login for users and an internal site that just uses integrated windows security and the users need to be impersonated.

I’ve looked around and found that John’s answer here is really good, but I don’t quite get how I can mix it up with my Forms authentication.

Suggestions?


Edit

I want to have an <asp:Login /> control and this control will authenticate against an Active Directory which has the same set of users as the Windows Machine that I want to use impersonation on.

My problem is that I don’t get how I can impersoante with the same username and pasword that is provided to the <asp:Login /> control.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T14:13:59+00:00Added an answer on May 15, 2026 at 2:13 pm

    In order for that solution to work, you’ll need access to the user’s id and password. I don’t believe that you can get this using the Login user control; you’ll need to create your own login form and handle the login actions yourself. Keep the user’s id and password, preferably in a secure string, in the session once you’ve authenticated and when you need to access the internal site on their behalf, use the Impersonator class from the referenced example to impersonate them using the credentials.

      using (var context = Impersonator.LogOn( username, password ))
      {
          try
          {
          ....
          }
          finally
          {
             context.Undo();
          }
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know you can impersonate in web.config, Is the exact same thing possible in
Possible Duplicate: How do I make a request using HTTP basic authentication with PHP
Possible Duplicate: check whether internet connection is available with C# I just want to
Possible Duplicate: How can I convert a list<> to a multi-dimensional array? I want
Possible Duplicate: How to do the vector of sets in C++? I want to
I am using WiX to install a certain EXE file. I want the WiX
I've got a WCF service that's running on IIS 6, with integrated authentication and
Is there any way to impersonate for sp_OA* calls? I'm specifically using this for
On Windows it is possible to have a service that allows clients running in
Is it possible to impersonate a client's identity when invoking a netTcp endpoint operation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.