Author: pbd22 | Posted on: 4/13/2010 11:24:11 AM | Views : 416

Hi.

How do I do this?
I was trying the below but the values that should have been initialized (within my custom role provider's Initialize method) are coming up null (such as pApplicationName). Code illustration appreciated. Thanks in advance.

private CustomRoleProvider _roles = null;

protected void Page_Load(object sender, EventArgs e)
{
_roles = new CustomRoleProvider();
}

public SomeMethod(string username)
{
// this fails because the Initialize method is never fired.
string[] roles = _roles.GetRolesForUser(username);

}
...

Go to the complete details ...