Forms Authentication with Active Directory LDAP Problem

T

Tdar

Sorry for the dup post but looking for a response and this is being posted
under my MSDN
managed newsgroups handle and in a different newsgroup

Hi,
As I said in the past post I am using this Article
http://msdn.microsoft.com/security/default.aspx?pull=/library/en-us/dnpag2/html/paght000026.asp

I belive i have everthing all set but I get this error when trying to log
into the site.

How do I correct this problem:

Server Error in '/' Application.
--------------------------------------------------------------------------------
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: The container specified in the connection string does
not exist.
Source Error:


Line 40: <membership defaultProvider="MyADMembershipProvider">
Line 41: <providers>
Line 42: <add name="MyADMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web,
Version=2.0.0.0, culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnectionString"
connectionUsername="silver1\administrator"
connectionPassword="THEPASSWORD"/>
Line 43: </providers>
Line 44: </membership>

Source File: E:\Webs\Silverqueen\WWW\web.config Line: 42
 
S

Steven Cheng[MSFT]

Hi Tdar,

Welcome to ASPNET newsgroup.
From your description ,you're trying to use the
ActiveDirectoryMembershipProvider to do formsauthentication through
Activedirectory. Howevere you're getting errro at the runtime.

As for the exception, are you getting it when you call the

System.Web.Security.Membership.ValidateUser method ? If so that did be
something incorrect with ADMembership Provider's configuration. Anyway,
please confirm that you're using the latest ASP.NET 2.0(.NET FRAMEWORK 2.0)
environement, at least beta2 or Auguest CTP ?

Then, from the error info you provided, it seems that the problem is focus
on the conneciton string attribute of the
<add name="MyADMembershipProvider"

element. Have you checked that your connectionString "ADConnectionString"
is set correctly in the web.config?
Also, you can change it to another name then run again to see whether the
problem is with the incorrect name or the connectionString itself.

If it is related to the connectionString itself, you can try checking
whether the ADSI conneciton string is correct. You can try do some adsi
querty in an console app to see whether it works.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



--------------------
| Reply-To: "Tdar" <[email protected]>
| From: "Tdar" <[email protected]>
| Subject: Forms Authentication with Active Directory LDAP Problem
| Date: Thu, 29 Sep 2005 22:02:04 -0400
| Lines: 43
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
| X-RFC2646: Format=Flowed; Original
| X-Antivirus: avast! (VPS 0539-2, 09/29/2005), Outbound message
| X-Antivirus-Status: Clean
| Message-ID: <[email protected]>
| Newsgroups:
microsoft.public.dotnet.framework.aspnet,microsoft.public.dotnet.framework.a
spnet.security
| NNTP-Posting-Host: 11-95.35-65.tampabay.res.rr.com 65.35.95.11
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet.security:6714
microsoft.public.dotnet.framework.aspnet:128153
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Sorry for the dup post but looking for a response and this is being
posted
| under my MSDN
| managed newsgroups handle and in a different newsgroup
|
| Hi,
| As I said in the past post I am using this Article
|
http://msdn.microsoft.com/security/default.aspx?pull=/library/en-us/dnpag2/h
tml/paght000026.asp
|
| I belive i have everthing all set but I get this error when trying to log
| into the site.
|
| How do I correct this problem:
|
| Server Error in '/' Application.
|
----------------------------------------------------------------------------
----
| 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: The container specified in the connection string
does
| not exist.
| Source Error:
|
|
| Line 40: <membership defaultProvider="MyADMembershipProvider">
| Line 41: <providers>
| Line 42: <add name="MyADMembershipProvider"
| type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web,
| Version=2.0.0.0, culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
| connectionStringName="ADConnectionString"
| connectionUsername="silver1\administrator"
| connectionPassword="THEPASSWORD"/>
| Line 43: </providers>
| Line 44: </membership>
|
| Source File: E:\Webs\Silverqueen\WWW\web.config Line: 42
|
----------------------------------------------------------------------------
----
| Version Information: Microsoft .NET Framework Version:2.0.50215.44;
ASP.NET
| Version:2.0.50215.44
|
|
|
|
|
 
A

Arnel

Your problem is with your LDAP path in your connection string. A
container you identify does not exist within your AD database. You can
encompass the entire domain by using a simple path such as:

LDAP://mydomain.com

in your connection string. Feel free to email me if you still have
problems.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top