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

  • SEARCH
  • Home
  • 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 213411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:16:33+00:00 2026-05-11T18:16:33+00:00

Looking for a bit of advice on where to take a current webapp which

  • 0

Looking for a bit of advice on where to take a current webapp which supports logins based on active directory and makes use of the built in asp login component.

The problem is that we want to have the option to use the active directory login or a “normal” login using data stored in our local database.

Just to make it clear. On each installed system it would be one or the other so I’m not asking how to check both each login atempt.

Basic flow:

Determine which login mode is set
  if active directory
    load active directory login form
    validate login info against active directory
    login to system
  else if normal login
    load default login form
    validate login info against database
    login to system

My lack of knowledge on the asp login component may be the problem here but I’m unsure of how to make the login component know which login mode to run the validation on? The login form seems just like a black box, which makes me a little uneasy when using it on such an important task.

Can this be done?

Or..

Should I just write a custom login for the system and be done with it?

  • 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-11T18:16:33+00:00Added an answer on May 11, 2026 at 6:16 pm

    The login control will be your friend in this situation, as it simply utilizes the ASP.Net membership provider model. You will not need to change the application at all!

    All you need to do is specify in the web.config file which authentication mode you’ll be using. This can of course be set up on a machine by machine basis. So, for your active directory machines:

    <connectionStrings>
      <add name="ADConnectionString" connectionString="LDAP://testdomain.test.com/CN=Users,DC=testdomain,DC=test,DC=com" />
     </connectionStrings>
    
    <membership defaultProvider="MyADMembershipProvider">
      <providers>
        <add
           name="MyADMembershipProvider"
           type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, 
                 Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
           connectionStringName="ADConnectionString"
           connectionUsername="testdomain\administrator" 
           connectionPassword="password"/>
      </providers>
     </membership>
    

    You can read more on implementing login with membership providers and active directory from http://msdn.microsoft.com/en-us/library/ms998360.aspx.

    And then for your machines that will be authenticating against a database, you simply write a custom membership provider that will authenticate against your database. It’s really simple, you really only need to implement one method. You can start here: http://msdn.microsoft.com/en-us/library/f1kyba5e.aspx.
    Here is a great example also, with a bare minimum of code and an easy walkthrough for setting it up: http://www.15seconds.com/issue/050216.htm

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a bit of quick advice on the way to run the
I'm looking for a bit of advice with regards to the structure of an
Hey, I'm looking for a bit of advice here, I have a simple model
Found the GUI programming bit difficult to grasp. Looking for some good materials/books/lecture_videos/advice for
looking for a bit of advice on SQL indexing. Whats the best type of
Looking for advice or a bit of help, to point me in the right
I'm looking for a bit of advice setting up a SQL cluster to be
I'm looking for advice on Perl best practices. I wrote a script which had
I have a report model looking a bit like this: class Report(models.Model): date =
Been looking around a bit and I can't seem to find any help on

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.