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

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You also need to add and then 'run custom tool'… May 12, 2026 at 1:18 am
  • Editorial Team
    Editorial Team added an answer That's because compiler will search function in the same namespace… May 12, 2026 at 1:18 am
  • Editorial Team
    Editorial Team added an answer if its a simple javascript.. here you go. <pre> <html>… May 12, 2026 at 1:18 am

Related Questions

Coming from a Classic ASP background, I'm used to multiple forms on a page,
What are some good tips and/or techniques for optimizing and improving the performance of
I used to work in a place where a common practice was to use
< backgound> I'm at a point where I really need to optimize C++ code.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.