469,588 Members | 2,734 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,588 developers. It's quick & easy.

ActiveDirectoryMembershipProvider Object Reference not set ...

I have been following several threads between David Thielen and Luke Zhang
[MSFT] regarding the ActiveDirectoryMembershipProvider as used for ASP.NET
2.0 Forms authentication, but I receive a slighly different error. I
consistently receive the following message after submitting credentials from
the login page:

Parser Error Message: Object reference not set to an instance of an object.

Source Error:

Line 30: <providers>
Line 31: <add name="ActiveDirectoryProvider"
Line 32: type="System.Web.Security.ActiveDirectoryMembershi pProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
Line 33: connectionStringName="ADService"
Line 34: attributeMapUsername="samAccountName"
This is not the "The specified connection
string does not represent a valid LDAP adspath." issue. I can solve that
with a valid ADSI path as follows:

<connectionStrings>
<add name="ADService" connectionString="LDAP://my.domain.com"/>
</connectionStrings>

From IIS 5 on XP SP2, I initially had trouble with invalid username or
password errors. These coule be solved by supplying the connectionUsername
and connectionPassword settings. On IIS6 from Windows 2003, the application
pool uses a Network Service account in the same domain in the LDAP setting so
I have no problems on that platform.

I can't help but think there is a simple solution to this, but so far I
missing something. I have already looked through several Microsoft articles
including the following:

Explained: Forms Authentication in ASP.NET 2.0
http://msdn.microsoft.com/library/de...lained0001.asp

How To: Use Forms Authentication with Active Directory in ASP.NET 2.0
http://msdn.microsoft.com/library/de...aght000026.asp

ActiveDirectoryMembershipProvider Class
http://msdn2.microsoft.com/en-us/lib...pprovider.aspx

ScottGu's Blog: ASP.NET 2.0 Membership, Roles, Forms Authentication, and
Security Resources
http://weblogs.asp.net/scottgu/archi...24/438953.aspx

Any ideas or suggestions will be appreciated.
Apr 21 '06 #1
2 4706
After submitting this question, I realized the
...dotnet.framework.aspnet.security group was more appropriate. Please see
the thread that started there

"ActiveDirectoryMembershipProvider Object Reference not set ..."- 4/21/2006

-JD Qixcle

"JD Qixcle" wrote:
I have been following several threads between David Thielen and Luke Zhang
[MSFT] regarding the ActiveDirectoryMembershipProvider as used for ASP.NET
2.0 Forms authentication, but I receive a slighly different error. I
consistently receive the following message after submitting credentials from
the login page:

Parser Error Message: Object reference not set to an instance of an object.

Source Error:

Line 30: <providers>
Line 31: <add name="ActiveDirectoryProvider"
Line 32: type="System.Web.Security.ActiveDirectoryMembershi pProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
Line 33: connectionStringName="ADService"
Line 34: attributeMapUsername="samAccountName"
This is not the "The specified connection
string does not represent a valid LDAP adspath." issue. I can solve that
with a valid ADSI path as follows:

<connectionStrings>
<add name="ADService" connectionString="LDAP://my.domain.com"/>
</connectionStrings>

From IIS 5 on XP SP2, I initially had trouble with invalid username or
password errors. These coule be solved by supplying the connectionUsername
and connectionPassword settings. On IIS6 from Windows 2003, the application
pool uses a Network Service account in the same domain in the LDAP setting so
I have no problems on that platform.

I can't help but think there is a simple solution to this, but so far I
missing something. I have already looked through several Microsoft articles
including the following:

Explained: Forms Authentication in ASP.NET 2.0
http://msdn.microsoft.com/library/de...lained0001.asp

How To: Use Forms Authentication with Active Directory in ASP.NET 2.0
http://msdn.microsoft.com/library/de...aght000026.asp

ActiveDirectoryMembershipProvider Class
http://msdn2.microsoft.com/en-us/lib...pprovider.aspx

ScottGu's Blog: ASP.NET 2.0 Membership, Roles, Forms Authentication, and
Security Resources
http://weblogs.asp.net/scottgu/archi...24/438953.aspx

Any ideas or suggestions will be appreciated.

Apr 21 '06 #2
As it turns out, the LDAP connection string needed to specify the port number
:389 for a Windows 2000 AD connection.

LDAP://domain.com:389/dc=domain,dc=com

Here is a reference to the post that fixed the problem:
http://forums.asp.net/thread/1137608.aspx
"JD Qixcle" wrote:
After submitting this question, I realized the
..dotnet.framework.aspnet.security group was more appropriate. Please see
the thread that started there

"ActiveDirectoryMembershipProvider Object Reference not set ..."- 4/21/2006

-JD Qixcle

"JD Qixcle" wrote:
I have been following several threads between David Thielen and Luke Zhang
[MSFT] regarding the ActiveDirectoryMembershipProvider as used for ASP.NET
2.0 Forms authentication, but I receive a slighly different error. I
consistently receive the following message after submitting credentials from
the login page:

Parser Error Message: Object reference not set to an instance of an object.

Source Error:

Line 30: <providers>
Line 31: <add name="ActiveDirectoryProvider"
Line 32: type="System.Web.Security.ActiveDirectoryMembershi pProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
Line 33: connectionStringName="ADService"
Line 34: attributeMapUsername="samAccountName"
This is not the "The specified connection
string does not represent a valid LDAP adspath." issue. I can solve that
with a valid ADSI path as follows:

<connectionStrings>
<add name="ADService" connectionString="LDAP://my.domain.com"/>
</connectionStrings>

From IIS 5 on XP SP2, I initially had trouble with invalid username or
password errors. These coule be solved by supplying the connectionUsername
and connectionPassword settings. On IIS6 from Windows 2003, the application
pool uses a Network Service account in the same domain in the LDAP setting so
I have no problems on that platform.

I can't help but think there is a simple solution to this, but so far I
missing something. I have already looked through several Microsoft articles
including the following:

Explained: Forms Authentication in ASP.NET 2.0
http://msdn.microsoft.com/library/de...lained0001.asp

How To: Use Forms Authentication with Active Directory in ASP.NET 2.0
http://msdn.microsoft.com/library/de...aght000026.asp

ActiveDirectoryMembershipProvider Class
http://msdn2.microsoft.com/en-us/lib...pprovider.aspx

ScottGu's Blog: ASP.NET 2.0 Membership, Roles, Forms Authentication, and
Security Resources
http://weblogs.asp.net/scottgu/archi...24/438953.aspx

Any ideas or suggestions will be appreciated.

Jun 8 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

18 posts views Thread by Glenn Eastlack | last post: by
5 posts views Thread by Gonza | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.