title: ASP.NET custom RoleProvider error
body: <p>I'm trying to use <strong><a href="http://davidhayden.com/blog/dave/archive/2007/10/17/CreateCustomRoleProviderASPNETRolePermissionsSecurity.aspx" rel="nofollow noreferrer">this article</a></strong> to learn about custom roleproviders, but I'm getting this error:</p>
  
  <p><strong>Could not load type 'TestRoles.SimpleRoleProvider'.</strong></p>
  
  <p>The relevant section from my web.config:</p>
  
  <pre><code>&lt;roleManager enabled="true" defaultProvider="SimpleRoleProvider"&gt;
          &lt;providers&gt;
              &lt;add name="SimpleRoleProvider" type="TestRoles.SimpleRoleProvider"/&gt;
          &lt;/providers&gt;
      &lt;/roleManager&gt;
  </code></pre>
  
  <p>The RolesProvider.cs class:</p>
  
  <pre><code>public class TestRoles{
  public class SimpleRoleProvider : RoleProvider
  {
      public override string[] GetRolesForUser(string username)
      {
          List&lt;string&gt; roles = new List&lt;string&gt;();
          roles.Add("Guest");
          if (username.Equals("Dave"))
              roles.Add("Admin");
          return roles.ToArray();
      }
   }
   }
  </code></pre>
  
  <p>From this error, it seems like it can't find the RoleProvider.  Any ideas?</p>