title: Could not load type for role provider
body: <p>I'm using custom role and membership providers. Both are in namespace <code>MyDomain.Infrastructure.Security</code></p>
  
  <p><code>MyCustomMembershipProvider</code> has filename: MyCustomMembershipProvider.cs 
  <code>MyCustomMembershipRoleProvider</code> has filename: MyCustomMembershipRoleProvider.cs</p>
  
  <p>Inside webconfig I have configured sections to use my cystom providers like:</p>
  
  <pre><code>&lt;membership defaultProvider="MyCustomMembershipProvider"&gt;
    &lt;providers&gt;
      &lt;clear/&gt;
      &lt;add name="MyCustomMembershipProvider"
           type="MyDomain.Infrastructure.Security"
           enablePasswordRetrieval="false"... /&gt;
    &lt;/providers&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;roleManager enabled="true"
               defaultProvider="MyDomain.Infrastructure.Security"&gt;
        &lt;providers&gt;
          &lt;clear/&gt;
          &lt;add applicationName="/" name="MyCustomMembershipRoleProvider"
               type="MyDomain.Infrastructure.Security" /&gt;
        &lt;/providers&gt;
      &lt;/roleManager&gt;
  </code></pre>
  
  <p>Even it's the same namespace on build I'm getting error on role provider and not for membership provider</p>
  
  <p>Error message is:</p>
  
  <blockquote>
    <p><em>Parser Error Message: Could not load type 'MyDomain.Infrastructure.Security'.</em></p>
  </blockquote>
  
  <p>Line 54:         </p>
  
  <pre><code>&lt;add applicationName="/" name="MyCustomMembershipRoleProvider"
       type="MyDomain.Infrastructure.Security" /&gt;
  </code></pre>
  
  <p>Update:
  As answer below suggests I added following</p>
  
  <pre><code>&lt;add applicationName="/" name="MyDomain.Infrastructure.Security.MyCustomMembershipRoleProvider, MyDomain.Infrastructure.Security" type="MyDomain.Infrastructure.Security" /&gt;
  </code></pre>
  
  <p>but error message remains the same.</p>
  
  <p>Am I doing something wrong here?</p>