We help IT Professionals succeed at work.

I am getting the following error while trying to authenticate agains active directory, any ideas?? asp.net 2.0 vb.net

442 Views
Last Modified: 2013-11-07
asp.net 2.0 vb.net
I am getting the following error while trying to authenticate agains active directory, any ideas??
Below is my config file


Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Object reference not set to an instance of an object.
Source Error:
Line 60:                         <add
Line 61:                            name="MyADMembershipProvider"
Line 62:                            type="System.Web.Security.ActiveDirectoryMembershipProvider,
Line 63:                            System.Web, Version=2.0.0.0, Culture=neutral,
Line 64:                                              PublicKeyToken=b03f5f7f11d50a3a"
Source File: C:\SourceCode\ADAuthTest\ADAuthTest\web.config    Line: 62


----------------------------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0"?>

<configuration>
    <appSettings/>
      <connectionStrings>
            <add name="ADConnectionString" connectionString="LDAP://extremefitness.local/CN=Users,DC=extremefitness,DC=local" />
      </connectionStrings>
      
    <system.web>
        <compilation debug="true" strict="false" explicit="true" />
            <authentication mode="Forms">
                  <forms name=".ASPXAUTH" loginUrl="frmLogin.aspx"
                           defaultUrl="default.aspx" protection="All"
                           timeout="20" path="/" requireSSL="false"
                           slidingExpiration="true" cookieless="UseDeviceProfile"
                           enableCrossAppRedirects="false">
                        <credentials passwordFormat="SHA1"/>
                  </forms>
            </authentication>

            <authorization>
                  <deny users="?" />
                  <allow users="*" />
            </authorization>

            <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="extremefitness.local\administrator"
                           connectionPassword="xxxxxxx"
                           attributeMapUsername="sAMAccountName"
                     />
                  </providers>
            </membership>
    </system.web>
</configuration>
Comment
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
I can not...
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
It is the connection string that is the problem according to the error....
yes
yes
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.