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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:44:49+00:00 2026-05-28T06:44:49+00:00

I am using VS2005 C#. I am trying to switch my login authentication from

  • 0

I am using VS2005 C#.

I am trying to switch my login authentication from the ASP.NET Web Site Administration Tool from using Internet to Local Network, which is the Windows authentication.

I have set the MembershipProvider of my Login tool in my web form to my MP name, MyADMembershipProvider.

Below is my current web.config file after making some changes:

<configuration>
    <appSettings/>
    <connectionStrings>
        <add name="SODConnectionString" connectionString="CONNECTIONSTRING" providerName="System.Data.SqlClient"/>

        <add name="ADConnectionString" connectionString="LDAP://URL"/>
    </connectionStrings>
    <system.web>
        <authentication mode="Windows" />
    <roleManager enabled="true" />
    <pages styleSheetTheme="DataWebControls"/>
        <membership defaultProvider="MyADMembershipProvider">
            <providers>
                <clear/>
                <add name="MyADMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=PUBTOKEN" applicationName="SOD" connectionStringName="ADConnectionString" connectionUsername="domain\Username" connectionPassword="Password" attributeMapUsername="sAMAccountName" enableSearchMethods="true" />
            </providers>

        </membership>
        <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
            <providers>
                <add name="XmlSiteMapProvider"
      description="Default SiteMap provider."
      type="System.Web.XmlSiteMapProvider"
      siteMapFile="Web.sitemap"
      securityTrimmingEnabled="true" />
            </providers>
        </siteMap>
            <compilation debug="true"/>
            <!-- Turn on Custom Errors -->
        <customErrors defaultRedirect="~/Error/NetworkError.aspx" mode="On">
   <error statusCode="404" redirect="~/Error/PageNotFound.aspx" />
  </customErrors>
    </system.web>
</configuration>`

I am currently receiving a configuration parse error message: Logon failure: unknown user name or bad password when I tried to log on with my Windows credentials of my machine within the intranet.

The error pointed out line

<add name="MyADMembershipProvider" 
     type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
     applicationName="SOD" 
     connectionStringName="ADConnectionString" 
     connectionUsername="domain\Username" 
     connectionPassword="Password" 
     attributeMapUsername="sAMAccountName" 
     enableSearchMethods="true" />

has an error.

May I know which part of my code went wrong?


EDIT:

I have filled in the actual credentials for the code

connectionUsername="domain\Username" connectionPassword="Password"

I am now able to login with the correct credentials, and I am also prompted wrong credential for incorrect log in attempts.

When another user of different credential from the one I ‘hardcoded’ in the connectionUsername and connectionPassword, the user is still able to log on.

However, my LoginName tool from the toolbox still shows the username of the ‘hardcoded’ credentials in the connectionUsername instead of the username of the logged in user.

May I know why is it so?

  • 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-28T06:44:50+00:00Added an answer on May 28, 2026 at 6:44 am

    I believe the error is with the membership provider and not specifically with the logon.

    It looks to me that the connectionUsername and connectionPassword properties in the membership provider are not specifying a valid AD account. I believe this account is used to verify the credentials during the logon process and to retrieve information about the account once it is logged on.

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

Sidebar

Related Questions

I’m trying to upgrade our solution from VS2005 .NET 2.0 to VS2008 .NET 3.5.
I'm currently using VS2005 Profesional and .NET 2.0, and since our project is rather
I have a Windows 7 machine on which I am using VS2005. .Net 2.0
I'm trying to compile someone elses C++ program using VS2005 on Windows 2003 (SP2).
I am using VS2005 C#. I am trying to convert my ListBox control to
I am using VS2005 C# and im trying to convert a pipe delimited text
I am using VS2005 C#, I am trying to import an excel filesheet into
I am using VS2005 and SQL Server 2005. I am trying to execute multiple
I am using VS2005 and SQL Server 2005. I am trying to execute multiple
First of all, I'm using VS2005 and C# 2.0. I'm trying to set a

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.