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 7307917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T23:29:12+00:00 2026-05-28T23:29:12+00:00

I have a working LDAP Server with these parameters: OU=users,OU=mydomain,O=this domain LDAP://myhost:389 I successfully

  • 0

I have a working LDAP Server with these parameters:

OU=users,OU=mydomain,O=this domain
LDAP://myhost:389 

I successfully access with a generic ldap client, like the good Jarek Gawor’s ldap browser/client with following settings:

OU=users,OU=mydomain,O=this domain
User info (append base DN):
uid=myid
password=mypwd

I tried to to the same with ASP.NET, getting always the error “wrong username or password“.
May you help me to setup web.config with above parameters, please?
I did many tries, like changing connectionUsername, removing domainname, putting uid=myid, etc…

web.config

<configuration>
  <connectionStrings>
  <add name="ADConnectionString" connectionString="LDAP://myhost:389"/>
  ....

<membership defaultProvider="DefaultMembershipProvider">
  <providers>
    <add name="DefaultMembershipProvider"
         type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
         connectionStringName="ADConnectionString"
         connectionProtection="None"
         connectionUsername="MYDOMAIN\myid"
         connectionPassword="mypwd"
         attributeMapUsername="sAMAccountName"
         enableSearchMethods="True" />
  </providers>
</membership>
......

Thanks in advance

  • 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-28T23:29:13+00:00Added an answer on May 28, 2026 at 11:29 pm

    I succeeded in getting it work with the following web.config setup.

    There were two problems/errors:

    1st) I did not specify the container, so I followed @Kevin’s hints:

    <configuration>
      <connectionStrings>
      <add name="ADConnectionString" connectionString="LDAP://myhost:389/O=this domain,CN=Users,DC=mydomain,DC=com"/>
      ....
    

    I think that was relevant the CN, while O could be omitted here, but I do not think this is very important…

    2nd) I put the DN base and username (in the form uid=) together inside connectionUsername parameter:

    <membership defaultProvider="DefaultMembershipProvider">
      <providers>
    <add name="DefaultMembershipProvider"
         type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
         connectionStringName="ADConnectionString"
         connectionProtection="None"
         connectionUsername="uid=myid, O=this domain"
         connectionPassword="mypwd"
         attributeMapUsername="sAMAccountName"
         enableSearchMethods="True" />
    

    Please note, in my case I needed to put uid=myid. I do not know if this could be a general solution; perhaps it is related to ADAS configuration of my company, I do not know. I hope this can help some of you…please vote up if you find this solution useful, thx.

    @Kevin: Thank you very much. You have been very helpful!

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

Sidebar

Related Questions

Have been working on this question for a couple hours and have come close
I have an SVN server, and I'd like to use our LDAP server for
I'm working on role-based security implementation in LDAP and Java. Specifically, I have the
I have successfully configured both PC-based TortoiseSVN and a test Linux-based Subversion server to
I have Apache/SVN running on Windows Server 2003 with authentication via LDAP/Active Directory and
I have LDAP authentication working with Apache. Now I need to know how I
I have got PHP 5.2.14 running successfully on Windows, with the LDAP extension loading
I have working code of js, it shows different div for selected option. <html>
I have working registration script the only problem is that i do not know
I have a third party library which I finally have working within my MonoTouch

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.