forms authentication + AzMan in ASP.Net 2...

J

Jéjé

Hi,

I try to use the AzMan to manage my roles & operations.
I'm using a form based authentication in an ASP.Net 2 application and the
SQL Server provider to store my users accounts into the database.

But I can manage roles for users with a login name which exists in the
Active Directory where my development server is.
Any time I try to play with a user account not reated in the AD, then I
receive some errors.
For example, when I try to add a role to a user, I receive this error:
Could not add the user to the role: Exception has been thrown by the target
of an invocation.

but the same commands works fine when I access the account which exists in
the AD.

my web.config:
<connectionStrings>
<remove name="LocalSqlServer" />

<add name="LocalSqlServer" connectionString="Data Source=<server>;Initial
Catalog=<database>;Persist Security Info=True;User ID=sa;Password="
providerName="System.Data.SqlClient" />
<add name="LocalPolicyStore"
connectionString="msxml://c:/folder/azmanstore.xml" />
</connectionStrings>


<membership>

<providers>

<remove name="AspNetSqlMembershipProvider"/>

<add connectionStringName="LocalSqlServer" enablePasswordRetrieval="false"

enablePasswordReset="true" requiresQuestionAndAnswer="true"

applicationName="/" requiresUniqueEmail="false"

passwordFormat="Hashed" maxInvalidPasswordAttempts="5"

passwordAttemptWindow="10" passwordStrengthRegularExpression=""

minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0"

name="AspNetSqlMembershipProvider"

type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

</providers>

</membership>



<roleManager

enabled="true"

cacheRolesInCookie="false"

defaultProvider="RoleManagerAzManProvider"

cookieName=".ASPXROLES"

cookiePath="/"

cookieTimeout="30"

cookieRequireSSL="false"

cookieSlidingExpiration="true"

createPersistentCookie="false"

cookieProtection="All">

<providers>

<add name="RoleManagerAzManProvider"

type="System.Web.Security.AuthorizationStoreRoleProvider, System.Web,
Version=2.0.0.0,

Culture=neutral, publicKeyToken=b03f5f7f11d50a3a"

connectionStringName="LocalPolicyStore"

applicationName="<application name>"/>

</providers>

</roleManager>



Thanks for your help!!!

jerome.
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top