Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ActiveDirectoryMembershipProvider

Reply
Thread Tools

ActiveDirectoryMembershipProvider

 
 
Glenn Eastlack
Guest
Posts: n/a
 
      05-17-2006
I have been trying to use ASP.NET 2.0 built-in Membership Providers.
Particularly the ActiveDirectoryMembershipProvider.

My web.config looks like this:
<connectionStrings>
<clear/>
<add name="ADConnectionString"
connectionString="LDAP://192.168.32.129/CN=users,CN=testdns,DC=test,DC=com"
/>
</connectionStrings>

<membership defaultProvider="MembershipADProvider">
<providers>
<add name="MembershipADProvider"

type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnectionString"

connectionUsername="testdns.test.com\administrator "
connectionPassword="password"/>
</providers>
</membership>


Active Directory is running on a Windows 2003 server within a VMWare
instance.

When I run the app and try to log in using the asp:Login control, I
receive the following error:

A referral was returned from the server

<providers>
Line 64: <add name="MembershipADProvider"
Line 65:
type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Line 66: connectionStringName="ADConnectionString"

Line 67: connectionUsername="(E-Mail Removed) "


Source File: C:\www\etlap-01.wur.ecri.org\html\web.config Line: 65

I can connection to AD just fine using the LDAPBrowser and the ADAM
adsiedit utility. Can anyone point me in the right direction to what
the error "A referral was returned from the server" means?

Much appreciated,
Glenn
 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      05-17-2006
re:
> Can anyone point me in the right direction to what
> the error "A referral was returned from the server" means?


Does your dc=test, dc=com actually exist ?
Does testdns.test.com\administrator exist ?

See :
http://www.computerperformance.co.uk...rom_the_server.
http://www.computerperformance.co.uk...e_8007202B.htm




Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
===================================
"Glenn Eastlack" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
>I have been trying to use ASP.NET 2.0 built-in Membership Providers.
> Particularly the ActiveDirectoryMembershipProvider.
>
> My web.config looks like this:
> <connectionStrings>
> <clear/>
> <add name="ADConnectionString"
> connectionString="LDAP://192.168.32.129/CN=users,CN=testdns,DC=test,DC=com"
> />
> </connectionStrings>
>
> <membership defaultProvider="MembershipADProvider">
> <providers>
> <add name="MembershipADProvider"
>
> type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
> connectionStringName="ADConnectionString"
>
> connectionUsername="testdns.test.com\administrator "
> connectionPassword="password"/>
> </providers>
> </membership>
>
>
> Active Directory is running on a Windows 2003 server within a VMWare
> instance.
>
> When I run the app and try to log in using the asp:Login control, I
> receive the following error:
>
> A referral was returned from the server
>
> <providers>
> Line 64: <add name="MembershipADProvider"
> Line 65:
> type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
> Line 66: connectionStringName="ADConnectionString"
>
> Line 67: connectionUsername="(E-Mail Removed) "
>
>
> Source File: C:\www\etlap-01.wur.ecri.org\html\web.config Line: 65
>
> I can connection to AD just fine using the LDAPBrowser and the ADAM
> adsiedit utility. Can anyone point me in the right direction to what
> the error "A referral was returned from the server" means?
>
> Much appreciated,
> Glenn



 
Reply With Quote
 
 
 
 
MSDN
Guest
Posts: n/a
 
      05-17-2006
Hello,

Few questions if you don't mind

Is it possible to set the
connectionUsername="" connectionPassword="" for a Provider Programmatically?

if so How

What tools I can use to test the AD connection string etc....

SA





"Glenn Eastlack" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have been trying to use ASP.NET 2.0 built-in Membership Providers.
> Particularly the ActiveDirectoryMembershipProvider.
>
> My web.config looks like this:
> <connectionStrings>
> <clear/>
> <add name="ADConnectionString"
> connectionString="LDAP://192.168.32.129/CN=users,CN=testdns,DC=test,DC=com"
> />
> </connectionStrings>
>
> <membership defaultProvider="MembershipADProvider">
> <providers>
> <add name="MembershipADProvider"
>
> type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
> connectionStringName="ADConnectionString"
>
> connectionUsername="testdns.test.com\administrator "
> connectionPassword="password"/>
> </providers>
> </membership>
>
>
> Active Directory is running on a Windows 2003 server within a VMWare
> instance.
>
> When I run the app and try to log in using the asp:Login control, I
> receive the following error:
>
> A referral was returned from the server
>
> <providers>
> Line 64: <add name="MembershipADProvider"
> Line 65:
> type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
> Line 66: connectionStringName="ADConnectionString"
>
> Line 67: connectionUsername="(E-Mail Removed) "
>
>
> Source File: C:\www\etlap-01.wur.ecri.org\html\web.config Line: 65
>
> I can connection to AD just fine using the LDAPBrowser and the ADAM
> adsiedit utility. Can anyone point me in the right direction to what
> the error "A referral was returned from the server" means?
>
> Much appreciated,
> Glenn



 
Reply With Quote
 
MSDN
Guest
Posts: n/a
 
      05-17-2006
Juan,

Do I have to use the administrator account for this to work
Can I set the connectionUsername="" connectionPassword="" for a Provider
Programmatically?

Thanks in advance

Sa


"Juan T. Llibre" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> re:
>> Can anyone point me in the right direction to what
>> the error "A referral was returned from the server" means?

>
> Does your dc=test, dc=com actually exist ?
> Does testdns.test.com\administrator exist ?
>
> See :
> http://www.computerperformance.co.uk...rom_the_server.
> http://www.computerperformance.co.uk...e_8007202B.htm
>
>
>
>
> Juan T. Llibre, asp.net MVP
> aspnetfaq.com : http://www.aspnetfaq.com/
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaņol : http://asp.net.do/foros/
> ===================================
> "Glenn Eastlack" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>I have been trying to use ASP.NET 2.0 built-in Membership Providers.
>> Particularly the ActiveDirectoryMembershipProvider.
>>
>> My web.config looks like this:
>> <connectionStrings>
>> <clear/>
>> <add name="ADConnectionString"
>> connectionString="LDAP://192.168.32.129/CN=users,CN=testdns,DC=test,DC=com"
>> />
>> </connectionStrings>
>>
>> <membership defaultProvider="MembershipADProvider">
>> <providers>
>> <add name="MembershipADProvider"
>>
>> type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>> connectionStringName="ADConnectionString"
>>
>> connectionUsername="testdns.test.com\administrator "
>> connectionPassword="password"/>
>> </providers>
>> </membership>
>>
>>
>> Active Directory is running on a Windows 2003 server within a VMWare
>> instance.
>>
>> When I run the app and try to log in using the asp:Login control, I
>> receive the following error:
>>
>> A referral was returned from the server
>>
>> <providers>
>> Line 64: <add name="MembershipADProvider"
>> Line 65:
>> type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>> Line 66: connectionStringName="ADConnectionString"
>>
>> Line 67:
>> connectionUsername="(E-Mail Removed) "
>>
>>
>> Source File: C:\www\etlap-01.wur.ecri.org\html\web.config Line: 65
>>
>> I can connection to AD just fine using the LDAPBrowser and the ADAM
>> adsiedit utility. Can anyone point me in the right direction to what
>> the error "A referral was returned from the server" means?
>>
>> Much appreciated,
>> Glenn

>
>



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      05-17-2006
re:
> Do I have to use the administrator account for this to work


No. To read the user database, you can use any account listed in AD.
To add users, you must have admin rights to the AD database.

re:
> Can I set the connectionUsername="" connectionPassword="" for a Provider Programmatically?


Sure.

In all cases, though, you must refer to a valid domain/AD database.
You can't use a "test" domain/AD database.

That's why I asked you if :

>> Does your dc=test, dc=com actually exist ?
>> Does testdns.test.com\administrator exist ?


actually exist.

I don't think you are the owner of test.com and testdns.test.com
is a subdomain of test.com, so you're using invalid domains.

That will never work.
That's why you received the error message you received.

You *must* use valid domains for AD queries.




Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
===================================
"MSDN" <(E-Mail Removed)> wrote in message news:%(E-Mail Removed)...
> Juan,
>
> Do I have to use the administrator account for this to work
> Can I set the connectionUsername="" connectionPassword="" for a Provider Programmatically?
>
> Thanks in advance
>
> Sa
>
>
> "Juan T. Llibre" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> re:
>>> Can anyone point me in the right direction to what
>>> the error "A referral was returned from the server" means?

>>
>> Does your dc=test, dc=com actually exist ?
>> Does testdns.test.com\administrator exist ?
>>
>> See :
>> http://www.computerperformance.co.uk...rom_the_server.
>> http://www.computerperformance.co.uk...e_8007202B.htm
>>
>>
>>
>>
>> Juan T. Llibre, asp.net MVP
>> aspnetfaq.com : http://www.aspnetfaq.com/
>> asp.net faq : http://asp.net.do/faq/
>> foros de asp.net, en espaņol : http://asp.net.do/foros/
>> ===================================
>> "Glenn Eastlack" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>>I have been trying to use ASP.NET 2.0 built-in Membership Providers.
>>> Particularly the ActiveDirectoryMembershipProvider.
>>>
>>> My web.config looks like this:
>>> <connectionStrings>
>>> <clear/>
>>> <add name="ADConnectionString"
>>> connectionString="LDAP://192.168.32.129/CN=users,CN=testdns,DC=test,DC=com"
>>> />
>>> </connectionStrings>
>>>
>>> <membership defaultProvider="MembershipADProvider">
>>> <providers>
>>> <add name="MembershipADProvider"
>>>
>>> type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>>> connectionStringName="ADConnectionString"
>>>
>>> connectionUsername="testdns.test.com\administrator "
>>> connectionPassword="password"/>
>>> </providers>
>>> </membership>
>>>
>>>
>>> Active Directory is running on a Windows 2003 server within a VMWare
>>> instance.
>>>
>>> When I run the app and try to log in using the asp:Login control, I
>>> receive the following error:
>>>
>>> A referral was returned from the server
>>>
>>> <providers>
>>> Line 64: <add name="MembershipADProvider"
>>> Line 65:
>>> type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>>> Line 66: connectionStringName="ADConnectionString"
>>>
>>> Line 67: connectionUsername="(E-Mail Removed) "
>>>
>>>
>>> Source File: C:\www\etlap-01.wur.ecri.org\html\web.config Line: 65
>>>
>>> I can connection to AD just fine using the LDAPBrowser and the ADAM
>>> adsiedit utility. Can anyone point me in the right direction to what
>>> the error "A referral was returned from the server" means?
>>>
>>> Much appreciated,
>>> Glenn



 
Reply With Quote
 
MSDN
Guest
Posts: n/a
 
      05-17-2006
Juan,

FYI: You mixed us up. MSDN and Glenn Eastlack. No problem....

I am currently using my account for the connectionUsername="" and the
connectionPassword="" properties.
Also using the correct domain name that we own etc...
however my if statement below is evaluating to false always.
if (Membership.ValidateUser(Login1.UserName, Login1.Password))

I know that my username and passwords for the provider properties above are
correct because if I use the wrong one then I get an error that said

"Unable to establish secure connection..." so it is doing something and
talking to the AD I think.

The Membership object is usable...

Now when I use the same UserName and Password that I use for the Providers
Properties I can not get authenticated.

What utility can I use to test this and how do I debug this to get going.

Thank you Juan.

SA




"Juan T. Llibre" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> re:
>> Do I have to use the administrator account for this to work

>
> No. To read the user database, you can use any account listed in AD.
> To add users, you must have admin rights to the AD database.
>
> re:
>> Can I set the connectionUsername="" connectionPassword="" for a Provider
>> Programmatically?

>
> Sure.
>
> In all cases, though, you must refer to a valid domain/AD database.
> You can't use a "test" domain/AD database.
>
> That's why I asked you if :
>
>>> Does your dc=test, dc=com actually exist ?
>>> Does testdns.test.com\administrator exist ?

>
> actually exist.
>
> I don't think you are the owner of test.com and testdns.test.com
> is a subdomain of test.com, so you're using invalid domains.
>
> That will never work.
> That's why you received the error message you received.
>
> You *must* use valid domains for AD queries.
>
>
>
>
> Juan T. Llibre, asp.net MVP
> aspnetfaq.com : http://www.aspnetfaq.com/
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaņol : http://asp.net.do/foros/
> ===================================
> "MSDN" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Juan,
>>
>> Do I have to use the administrator account for this to work
>> Can I set the connectionUsername="" connectionPassword="" for a Provider
>> Programmatically?
>>
>> Thanks in advance
>>
>> Sa
>>
>>
>> "Juan T. Llibre" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> re:
>>>> Can anyone point me in the right direction to what
>>>> the error "A referral was returned from the server" means?
>>>
>>> Does your dc=test, dc=com actually exist ?
>>> Does testdns.test.com\administrator exist ?
>>>
>>> See :
>>> http://www.computerperformance.co.uk...rom_the_server.
>>> http://www.computerperformance.co.uk...e_8007202B.htm
>>>
>>>
>>>
>>>
>>> Juan T. Llibre, asp.net MVP
>>> aspnetfaq.com : http://www.aspnetfaq.com/
>>> asp.net faq : http://asp.net.do/faq/
>>> foros de asp.net, en espaņol : http://asp.net.do/foros/
>>> ===================================
>>> "Glenn Eastlack" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>>I have been trying to use ASP.NET 2.0 built-in Membership Providers.
>>>> Particularly the ActiveDirectoryMembershipProvider.
>>>>
>>>> My web.config looks like this:
>>>> <connectionStrings>
>>>> <clear/>
>>>> <add name="ADConnectionString"
>>>> connectionString="LDAP://192.168.32.129/CN=users,CN=testdns,DC=test,DC=com"
>>>> />
>>>> </connectionStrings>
>>>>
>>>> <membership defaultProvider="MembershipADProvider">
>>>> <providers>
>>>> <add name="MembershipADProvider"
>>>>
>>>> type="System.Web.Security.ActiveDirectoryMembershi pProvider,
>>>> System.Web,
>>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>>>> connectionStringName="ADConnectionString"
>>>>
>>>> connectionUsername="testdns.test.com\administrator "
>>>> connectionPassword="password"/>
>>>> </providers>
>>>> </membership>
>>>>
>>>>
>>>> Active Directory is running on a Windows 2003 server within a VMWare
>>>> instance.
>>>>
>>>> When I run the app and try to log in using the asp:Login control, I
>>>> receive the following error:
>>>>
>>>> A referral was returned from the server
>>>>
>>>> <providers>
>>>> Line 64: <add name="MembershipADProvider"
>>>> Line 65:
>>>> type="System.Web.Security.ActiveDirectoryMembershi pProvider,
>>>> System.Web,
>>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>>>> Line 66: connectionStringName="ADConnectionString"
>>>>
>>>> Line 67: connectionUsername="(E-Mail Removed) "
>>>>
>>>>
>>>> Source File: C:\www\etlap-01.wur.ecri.org\html\web.config Line: 65
>>>>
>>>> I can connection to AD just fine using the LDAPBrowser and the ADAM
>>>> adsiedit utility. Can anyone point me in the right direction to what
>>>> the error "A referral was returned from the server" means?
>>>>
>>>> Much appreciated,
>>>> Glenn

>
>



 
Reply With Quote
 
MSDN
Guest
Posts: n/a
 
      05-17-2006
Juan,

I have th following in my web.config.

<add name="ADConnectionString_corp"
connectionString="LDAP://corp.ourdomain.com/CN=Users,DC=corp,DC=ourdomain,DC=com"/>


and

<providers>

<add name="MembershipADProvider"
type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnectionString_corp"
connectionUsername="ourdomain.com\sam.agent"
connectionPassword="mypasswordhere"/>

</providers>

Do you see anything wrong here??

SA





"Juan T. Llibre" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> re:
>> Do I have to use the administrator account for this to work

>
> No. To read the user database, you can use any account listed in AD.
> To add users, you must have admin rights to the AD database.
>
> re:
>> Can I set the connectionUsername="" connectionPassword="" for a Provider
>> Programmatically?

>
> Sure.
>
> In all cases, though, you must refer to a valid domain/AD database.
> You can't use a "test" domain/AD database.
>
> That's why I asked you if :
>
>>> Does your dc=test, dc=com actually exist ?
>>> Does testdns.test.com\administrator exist ?

>
> actually exist.
>
> I don't think you are the owner of test.com and testdns.test.com
> is a subdomain of test.com, so you're using invalid domains.
>
> That will never work.
> That's why you received the error message you received.
>
> You *must* use valid domains for AD queries.
>
>
>
>
> Juan T. Llibre, asp.net MVP
> aspnetfaq.com : http://www.aspnetfaq.com/
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaņol : http://asp.net.do/foros/
> ===================================
> "MSDN" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Juan,
>>
>> Do I have to use the administrator account for this to work
>> Can I set the connectionUsername="" connectionPassword="" for a Provider
>> Programmatically?
>>
>> Thanks in advance
>>
>> Sa
>>
>>
>> "Juan T. Llibre" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> re:
>>>> Can anyone point me in the right direction to what
>>>> the error "A referral was returned from the server" means?
>>>
>>> Does your dc=test, dc=com actually exist ?
>>> Does testdns.test.com\administrator exist ?
>>>
>>> See :
>>> http://www.computerperformance.co.uk...rom_the_server.
>>> http://www.computerperformance.co.uk...e_8007202B.htm
>>>
>>>
>>>
>>>
>>> Juan T. Llibre, asp.net MVP
>>> aspnetfaq.com : http://www.aspnetfaq.com/
>>> asp.net faq : http://asp.net.do/faq/
>>> foros de asp.net, en espaņol : http://asp.net.do/foros/
>>> ===================================
>>> "Glenn Eastlack" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>>I have been trying to use ASP.NET 2.0 built-in Membership Providers.
>>>> Particularly the ActiveDirectoryMembershipProvider.
>>>>
>>>> My web.config looks like this:
>>>> <connectionStrings>
>>>> <clear/>
>>>> <add name="ADConnectionString"
>>>> connectionString="LDAP://192.168.32.129/CN=users,CN=testdns,DC=test,DC=com"
>>>> />
>>>> </connectionStrings>
>>>>
>>>> <membership defaultProvider="MembershipADProvider">
>>>> <providers>
>>>> <add name="MembershipADProvider"
>>>>
>>>> type="System.Web.Security.ActiveDirectoryMembershi pProvider,
>>>> System.Web,
>>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>>>> connectionStringName="ADConnectionString"
>>>>
>>>> connectionUsername="testdns.test.com\administrator "
>>>> connectionPassword="password"/>
>>>> </providers>
>>>> </membership>
>>>>
>>>>
>>>> Active Directory is running on a Windows 2003 server within a VMWare
>>>> instance.
>>>>
>>>> When I run the app and try to log in using the asp:Login control, I
>>>> receive the following error:
>>>>
>>>> A referral was returned from the server
>>>>
>>>> <providers>
>>>> Line 64: <add name="MembershipADProvider"
>>>> Line 65:
>>>> type="System.Web.Security.ActiveDirectoryMembershi pProvider,
>>>> System.Web,
>>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>>>> Line 66: connectionStringName="ADConnectionString"
>>>>
>>>> Line 67: connectionUsername="(E-Mail Removed) "
>>>>
>>>>
>>>> Source File: C:\www\etlap-01.wur.ecri.org\html\web.config Line: 65
>>>>
>>>> I can connection to AD just fine using the LDAPBrowser and the ADAM
>>>> adsiedit utility. Can anyone point me in the right direction to what
>>>> the error "A referral was returned from the server" means?
>>>>
>>>> Much appreciated,
>>>> Glenn

>
>



 
Reply With Quote
 
Glenn Eastlack
Guest
Posts: n/a
 
      05-18-2006
Thanks for your help. It turns out that I misspelled the base DN in the
connection string (I actually changed the name to hide my client).

My connection string now looks like this:
<add name="ADConnectionString"
connectionString="LDAP://192.168.32.129/DC=testdns,DC=client,DC=com" />

and my Providers look like this:

<add name="MembershipADProvider"
type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnectionString"

connectionUsername="(E-Mail Removed) om"
connectionPassword="password"
/>

I've now moved on to trying to create my own custom Provider and
MembershipUser. The question I have is when and how does the
MembershipUser get created and can you override how it gets created? In
particular, I have several attributes held in a SQL Server database that
I want to value.

Thanks,
Glenn

Juan T. Llibre wrote:
> re:
>> Can anyone point me in the right direction to what
>> the error "A referral was returned from the server" means?

>
> Does your dc=test, dc=com actually exist ?
> Does testdns.test.com\administrator exist ?
>
> See :
> http://www.computerperformance.co.uk...rom_the_server.
> http://www.computerperformance.co.uk...e_8007202B.htm
>
>
>
>
> Juan T. Llibre, asp.net MVP
> aspnetfaq.com : http://www.aspnetfaq.com/
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaņol : http://asp.net.do/foros/
> ===================================
> "Glenn Eastlack" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
>> I have been trying to use ASP.NET 2.0 built-in Membership Providers.
>> Particularly the ActiveDirectoryMembershipProvider.
>>
>> My web.config looks like this:
>> <connectionStrings>
>> <clear/>
>> <add name="ADConnectionString"
>> connectionString="LDAP://192.168.32.129/CN=users,CN=testdns,DC=test,DC=com"
>> />
>> </connectionStrings>
>>
>> <membership defaultProvider="MembershipADProvider">
>> <providers>
>> <add name="MembershipADProvider"
>>
>> type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>> connectionStringName="ADConnectionString"
>>
>> connectionUsername="testdns.test.com\administrator "
>> connectionPassword="password"/>
>> </providers>
>> </membership>
>>
>>
>> Active Directory is running on a Windows 2003 server within a VMWare
>> instance.
>>
>> When I run the app and try to log in using the asp:Login control, I
>> receive the following error:
>>
>> A referral was returned from the server
>>
>> <providers>
>> Line 64: <add name="MembershipADProvider"
>> Line 65:
>> type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>> Line 66: connectionStringName="ADConnectionString"
>>
>> Line 67: connectionUsername="(E-Mail Removed) "
>>
>>
>> Source File: C:\www\etlap-01.wur.ecri.org\html\web.config Line: 65
>>
>> I can connection to AD just fine using the LDAPBrowser and the ADAM
>> adsiedit utility. Can anyone point me in the right direction to what
>> the error "A referral was returned from the server" means?
>>
>> Much appreciated,
>> Glenn

>
>

 
Reply With Quote
 
MSDN
Guest
Posts: n/a
 
      05-18-2006
Glenn,

I have no errors or exceptions in my code but I keep on getting false in my
if statement when I try to validate the username and password.

So the Membership object is created with no problem.

if (Membership.ValidateUser(Login1.UserName, Login1.Password))

Do you know what I should look for??

Thanks for any help you can give me.

Sa


"Glenn Eastlack" <(E-Mail Removed)> wrote in message
news:u$jI$(E-Mail Removed)...
> Thanks for your help. It turns out that I misspelled the base DN in the
> connection string (I actually changed the name to hide my client).
>
> My connection string now looks like this:
> <add name="ADConnectionString"
> connectionString="LDAP://192.168.32.129/DC=testdns,DC=client,DC=com" />
>
> and my Providers look like this:
>
> <add name="MembershipADProvider"
> type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
> connectionStringName="ADConnectionString"
> connectionUsername="(E-Mail Removed) om"
> connectionPassword="password"
> />
>
> I've now moved on to trying to create my own custom Provider and
> MembershipUser. The question I have is when and how does the
> MembershipUser get created and can you override how it gets created? In
> particular, I have several attributes held in a SQL Server database that I
> want to value.
>
> Thanks,
> Glenn
>
> Juan T. Llibre wrote:
>> re:
>>> Can anyone point me in the right direction to what
>>> the error "A referral was returned from the server" means?

>>
>> Does your dc=test, dc=com actually exist ?
>> Does testdns.test.com\administrator exist ?
>>
>> See :
>> http://www.computerperformance.co.uk...rom_the_server.
>> http://www.computerperformance.co.uk...e_8007202B.htm
>>
>>
>>
>>
>> Juan T. Llibre, asp.net MVP
>> aspnetfaq.com : http://www.aspnetfaq.com/
>> asp.net faq : http://asp.net.do/faq/
>> foros de asp.net, en espaņol : http://asp.net.do/foros/
>> ===================================
>> "Glenn Eastlack" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> I have been trying to use ASP.NET 2.0 built-in Membership Providers.
>>> Particularly the ActiveDirectoryMembershipProvider.
>>>
>>> My web.config looks like this:
>>> <connectionStrings>
>>> <clear/>
>>> <add name="ADConnectionString"
>>> connectionString="LDAP://192.168.32.129/CN=users,CN=testdns,DC=test,DC=com"
>>> />
>>> </connectionStrings>
>>>
>>> <membership defaultProvider="MembershipADProvider">
>>> <providers>
>>> <add name="MembershipADProvider"
>>>
>>> type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>>> connectionStringName="ADConnectionString"
>>>
>>> connectionUsername="testdns.test.com\administrator "
>>> connectionPassword="password"/>
>>> </providers>
>>> </membership>
>>>
>>>
>>> Active Directory is running on a Windows 2003 server within a VMWare
>>> instance.
>>>
>>> When I run the app and try to log in using the asp:Login control, I
>>> receive the following error:
>>>
>>> A referral was returned from the server
>>>
>>> <providers>
>>> Line 64: <add name="MembershipADProvider"
>>> Line 65:
>>> type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>>> Line 66: connectionStringName="ADConnectionString"
>>>
>>> Line 67:
>>> connectionUsername="(E-Mail Removed) "
>>>
>>>
>>> Source File: C:\www\etlap-01.wur.ecri.org\html\web.config Line: 65
>>>
>>> I can connection to AD just fine using the LDAPBrowser and the ADAM
>>> adsiedit utility. Can anyone point me in the right direction to what
>>> the error "A referral was returned from the server" means?
>>>
>>> Much appreciated,
>>> Glenn

>>


 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      05-18-2006
re:
>> I've now moved on to trying to create my own custom Provider and MembershipUser. The question I
>> have is when and how does the MembershipUser get created and can you override how it gets
>> created?


You'll find a complete roadmap to creating your own Providers in Scott's blog :

http://weblogs.asp.net/scottgu/archi...24/438953.aspx

In particular, check out the sections titled "Custom Membership and Roles Providers"

re:
> I have several attributes held in a SQL Server database that I want to value.


Check the section titled "Storing Custom Properties about a User during Registration".
There's full sample and a couple of links there.





Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
===================================
"MSDN" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Glenn,
>
> I have no errors or exceptions in my code but I keep on getting false in my if statement when I
> try to validate the username and password.
>
> So the Membership object is created with no problem.
>
> if (Membership.ValidateUser(Login1.UserName, Login1.Password))
>
> Do you know what I should look for??
>
> Thanks for any help you can give me.
>
> Sa
>
>
> "Glenn Eastlack" <(E-Mail Removed)> wrote in message
> news:u$jI$(E-Mail Removed)...
>> Thanks for your help. It turns out that I misspelled the base DN in the connection string (I
>> actually changed the name to hide my client).
>>
>> My connection string now looks like this:
>> <add name="ADConnectionString"
>> connectionString="LDAP://192.168.32.129/DC=testdns,DC=client,DC=com" />
>>
>> and my Providers look like this:
>>
>> <add name="MembershipADProvider"
>> type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web, Version=2.0.0.0,
>> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>> connectionStringName="ADConnectionString"
>> connectionUsername="(E-Mail Removed) om"
>> connectionPassword="password"
>> />
>>
>> I've now moved on to trying to create my own custom Provider and MembershipUser. The question I
>> have is when and how does the MembershipUser get created and can you override how it gets
>> created? In particular, I have several attributes held in a SQL Server database that I want to
>> value.
>>
>> Thanks,
>> Glenn
>>
>> Juan T. Llibre wrote:
>>> re:
>>>> Can anyone point me in the right direction to what
>>>> the error "A referral was returned from the server" means?
>>>
>>> Does your dc=test, dc=com actually exist ?
>>> Does testdns.test.com\administrator exist ?
>>>
>>> See :
>>> http://www.computerperformance.co.uk...rom_the_server.
>>> http://www.computerperformance.co.uk...e_8007202B.htm
>>>
>>>
>>>
>>>
>>> Juan T. Llibre, asp.net MVP
>>> aspnetfaq.com : http://www.aspnetfaq.com/
>>> asp.net faq : http://asp.net.do/faq/
>>> foros de asp.net, en espaņol : http://asp.net.do/foros/
>>> ===================================
>>> "Glenn Eastlack" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> I have been trying to use ASP.NET 2.0 built-in Membership Providers.
>>>> Particularly the ActiveDirectoryMembershipProvider.
>>>>
>>>> My web.config looks like this:
>>>> <connectionStrings>
>>>> <clear/>
>>>> <add name="ADConnectionString"
>>>> connectionString="LDAP://192.168.32.129/CN=users,CN=testdns,DC=test,DC=com"
>>>> />
>>>> </connectionStrings>
>>>>
>>>> <membership defaultProvider="MembershipADProvider">
>>>> <providers>
>>>> <add name="MembershipADProvider"
>>>>
>>>> type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
>>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>>>> connectionStringName="ADConnectionString"
>>>>
>>>> connectionUsername="testdns.test.com\administrator "
>>>> connectionPassword="password"/>
>>>> </providers>
>>>> </membership>
>>>>
>>>>
>>>> Active Directory is running on a Windows 2003 server within a VMWare
>>>> instance.
>>>>
>>>> When I run the app and try to log in using the asp:Login control, I
>>>> receive the following error:
>>>>
>>>> A referral was returned from the server
>>>>
>>>> <providers>
>>>> Line 64: <add name="MembershipADProvider"
>>>> Line 65:
>>>> type="System.Web.Security.ActiveDirectoryMembershi pProvider, System.Web,
>>>> Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
>>>> Line 66: connectionStringName="ADConnectionString"
>>>>
>>>> Line 67: connectionUsername="(E-Mail Removed) "
>>>>
>>>>
>>>> Source File: C:\www\etlap-01.wur.ecri.org\html\web.config Line: 65
>>>>
>>>> I can connection to AD just fine using the LDAPBrowser and the ADAM
>>>> adsiedit utility. Can anyone point me in the right direction to what
>>>> the error "A referral was returned from the server" means?
>>>>
>>>> Much appreciated,
>>>> Glenn
>>>

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveDirectoryMembershipProvider Object Reference not set ... =?Utf-8?B?SkQgUWl4Y2xl?= ASP .Net 2 06-08-2006 11:40 PM
Membership credential verification failed With ActiveDirectoryMembershipProvider moi ASP .Net 1 04-21-2006 05:05 PM
user schema change for ActiveDirectoryMembershipProvider steven@sbcanada.com ASP .Net 0 11-01-2005 09:25 PM
ActiveDirectoryMembershipProvider ASP.NET 2.0 Arnel ASP .Net 3 10-31-2005 06:02 AM
ActiveDirectoryMembershipProvider login always fail Natan Vivo ASP .Net 1 10-31-2005 02:43 AM



Advertisments