R
riyaz.mansoor
Hi.
I've got the following web.config settings below. Currently, it
authorises correctly - ie only AD users only. However, in my aspx
pages if have the following code, it does not seem to be accessing AD
What should I do?
Thanks
Riyaz
<connectionStrings>
<add name="ADConnectionString"
connectionString="LDAP://trade.gov.mv/
CN=Users,DC=trade,DC=gov,DC=mv" />
<add name="TradeStaffWebsiteConnectionString"
connectionString="Data Source=RIYAZMANSOOR
\SQLEXPRESS;Initial Catalog=TradeStaffWebsite;Integrated
Security=True"
providerName="System.Data.SqlClient" />
<add name="namesearchConnectionString"
connectionString="Data Source=APPSERVER;Initial
Catalog=namesearch;uid=sa;pwd=sa;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<roleManager enabled="true" />
<compilation debug="true" strict="false" explicit="true" />
<authentication mode="Forms">
<forms name=".ADAuthCookie" loginUrl="~/staff/Login.aspx"
timeout="10" />
</authentication>
<!-- <identity impersonate="true"/> -->
<membership defaultProvider="MyADMembershipProvider" >
<providers>
<add enableSearchMethods="true"
name="MyADMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
attributeMapUsername="sAMAccountName"
connectionStringName="ADConnectionString"
connectionUsername="x"
connectionPassword="x"/>
</providers>
</membership>
</system.web>
I've got the following web.config settings below. Currently, it
authorises correctly - ie only AD users only. However, in my aspx
pages if have the following code, it does not seem to be accessing AD
the actual should be much higher> Roles.GetAllRoles 'returns NO roles
> Membership.GetAllUsers().Count.ToString() ' returns 3 when
What should I do?
Thanks
Riyaz
<connectionStrings>
<add name="ADConnectionString"
connectionString="LDAP://trade.gov.mv/
CN=Users,DC=trade,DC=gov,DC=mv" />
<add name="TradeStaffWebsiteConnectionString"
connectionString="Data Source=RIYAZMANSOOR
\SQLEXPRESS;Initial Catalog=TradeStaffWebsite;Integrated
Security=True"
providerName="System.Data.SqlClient" />
<add name="namesearchConnectionString"
connectionString="Data Source=APPSERVER;Initial
Catalog=namesearch;uid=sa;pwd=sa;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<roleManager enabled="true" />
<compilation debug="true" strict="false" explicit="true" />
<authentication mode="Forms">
<forms name=".ADAuthCookie" loginUrl="~/staff/Login.aspx"
timeout="10" />
</authentication>
<!-- <identity impersonate="true"/> -->
<membership defaultProvider="MyADMembershipProvider" >
<providers>
<add enableSearchMethods="true"
name="MyADMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
attributeMapUsername="sAMAccountName"
connectionStringName="ADConnectionString"
connectionUsername="x"
connectionPassword="x"/>
</providers>
</membership>
</system.web>