Membership.GetAllusers Method always returns FALSE. Help me.

A

Anjan

Hi All,
I am new to Membership feature in ASP.NET 2.0. I am trying the
following scenario.

Environment : WinXP SP2
Framework: .NET v2.0, VS.NET 2005.
User Data Storage : ADAM.

I have an Web Application. Web.Config file has Windows Authetication
and added
----------------------- Web.Config
----------------------------------------------
<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="CN=superuser,CN=people,OU=TestOU,O=TestO,C=US"
connectionPassword="Windows2003" connectionProtection="None"
enableSearchMethods="true" />
</providers>
</membership>

<connectionStrings>
<add name="ADConnectionString" connectionString="LDAP://localhost:389/
CN=people,OU=TestOU,O=TestO,C=US"/>
</connectionStrings>

I have added 2 users in ADAM store. Now i have written

MembershipUserCollection users = Membership.GetAllUsers();

if (users.Count > 0)
{
foreach (MembershipUser user in users)
{
Response.Write(user.UserName);
}
}
else
{

Response.Write("no users found");
}

The GetAllusers() method always returns 0 users.

In this application i have to use the Authentication Mode has Windows.
I wanted to use the Membership Provider feature to validate the user
against ADAM. Please suggest me if i am doing anything wrong here.

Thanks & Regards
Anjan
 

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,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top