AD authorisation and roles


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
> Roles.GetAllRoles 'returns NO roles
> Membership.GetAllUsers().Count.ToString() ' returns 3 when
the actual should be much higher

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>
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top