D
David Thielen
Note: complete Web.Config below
When I use AspNetSqlMembershipProvider everything works fine. But when I try
AspNetActiveDirectoryMembershipProvider I get "The specified connection
string does not represent a valid LDAP adspath.".
I can run ldp.exe on the same computer. do Connect, Connect, enter
picard.windward.local and click OK and it connects and gives me back a bunch
of LDAP info.
I ran .NET Framework 2.0 Configuration and for My_Computer_Zone Code Group
it says:
Description:
Code group grants full trust to all code originating on the local computer
Assembly evidence must match this membership condition to belong to the code
group: Zone: MyComputer.
Assemblies matching the membership condition are granted this permission set
at the current policy level: FullTrust.
Permission Set Description:
Allows full access to all resources
so I don't see how permissions can be a problem.
I've run under IIS and the local VS 2005 webserver - same problem with each.
I've tried with and without the <forms> node in Web.Config - same error.
My server is Windows 2003 Small Business Server and is a domain server.
What is going wrong?
Web.Config:
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings/>
<connectionStrings>
<add name="WindwardSqlServer"
connectionString="SERVER=.;DATABASE=northwind;UID=sa;Password=mmouse;" />
<add name="ADService" connectionString="LDAP://picard.windward.local/" />
<add name="WindwardPortal" connectionString="Data Source=BELLE;Initial
Catalog=WindwardPortal;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<roleManager enabled="true"/>
<compilation debug="true">
<assemblies>
<add assembly="System.Security, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
</compilation>
<pages theme="SmokeAndGlass"/>
<!-- this works!
<authentication mode="Forms">
<forms loginUrl="login.aspx">
</forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
<membership defaultProvider="AspNetSqlMembershipProvider"/>
-->
<authentication mode="Forms">
<!-- tried with and without this
<forms name=".ADAuthCookie" loginUrl="login.aspx">
</forms>
-->
</authentication>
<authorization>
<deny users="?"/>
</authorization>
<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
<providers>
<add name="AspNetActiveDirectoryMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADService"
/>
</providers>
</membership>
</system.web>
</configuration>
When I use AspNetSqlMembershipProvider everything works fine. But when I try
AspNetActiveDirectoryMembershipProvider I get "The specified connection
string does not represent a valid LDAP adspath.".
I can run ldp.exe on the same computer. do Connect, Connect, enter
picard.windward.local and click OK and it connects and gives me back a bunch
of LDAP info.
I ran .NET Framework 2.0 Configuration and for My_Computer_Zone Code Group
it says:
Description:
Code group grants full trust to all code originating on the local computer
Assembly evidence must match this membership condition to belong to the code
group: Zone: MyComputer.
Assemblies matching the membership condition are granted this permission set
at the current policy level: FullTrust.
Permission Set Description:
Allows full access to all resources
so I don't see how permissions can be a problem.
I've run under IIS and the local VS 2005 webserver - same problem with each.
I've tried with and without the <forms> node in Web.Config - same error.
My server is Windows 2003 Small Business Server and is a domain server.
What is going wrong?
Web.Config:
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings/>
<connectionStrings>
<add name="WindwardSqlServer"
connectionString="SERVER=.;DATABASE=northwind;UID=sa;Password=mmouse;" />
<add name="ADService" connectionString="LDAP://picard.windward.local/" />
<add name="WindwardPortal" connectionString="Data Source=BELLE;Initial
Catalog=WindwardPortal;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<roleManager enabled="true"/>
<compilation debug="true">
<assemblies>
<add assembly="System.Security, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
</compilation>
<pages theme="SmokeAndGlass"/>
<!-- this works!
<authentication mode="Forms">
<forms loginUrl="login.aspx">
</forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
<membership defaultProvider="AspNetSqlMembershipProvider"/>
-->
<authentication mode="Forms">
<!-- tried with and without this
<forms name=".ADAuthCookie" loginUrl="login.aspx">
</forms>
-->
</authentication>
<authorization>
<deny users="?"/>
</authorization>
<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
<providers>
<add name="AspNetActiveDirectoryMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADService"
/>
</providers>
</membership>
</system.web>
</configuration>