Created
April 7, 2016 15:18
-
-
Save vongillern/f1f7ef0f0318f881ee9b4d4d750841c8 to your computer and use it in GitHub Desktop.
how to use a custom role provider in aspnet mvc via the webconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<system.web> | |
<customErrors mode="RemoteOnly" /> | |
<compilation debug="true" targetFramework="4.0" /> | |
<authentication mode="Forms"> | |
<forms loginUrl="~/Login" defaultUrl="/project/list" timeout="240" slidingExpiration="true" /> | |
</authentication> | |
<profile defaultProvider="DefaultProfileProvider"> | |
<providers> | |
<add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" /> | |
</providers> | |
</profile> | |
<membership defaultProvider="DefaultMembershipProvider"> | |
<providers> | |
<add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /> | |
</providers> | |
</membership> | |
<!-- ZIA, LOOK DOWN HERE --> | |
<roleManager defaultProvider="MyCustomRoleProvider" enabled="true"> | |
<providers> | |
<clear /> | |
<add name="MyCustomRoleProvider" type="MyFullyQualifiedNamespace.MyCustomRoleProvider" /> | |
</providers> | |
</roleManager> | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment