By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,934 Members | 1,366 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,934 IT Pros & Developers. It's quick & easy.

Forms Authentication with Active Directory LDAP Problem

P: n/a
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/d...aght000026.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.ActiveDirectoryMembershi pProvider, 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


Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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" <Td**@noemail.nospam>
| From: "Tdar" <Td**@noemail.nospam>
| 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: <Os**************@TK2MSFTNGP14.phx.gbl>
| 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!TK2MSFT NGP14.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/d...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.ActiveDirectoryMembershi pProvider, 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
|
|
|
|
|

Nov 19 '05 #2

P: n/a
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.

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.