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

ActiveDirectoryMembershipProvider Object Reference not set ...

P: n/a
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
Share this Question
Share on Google+
2 Replies


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

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