开发者

Web.Security.Membership and Web.Security.Roles

I am currently using Web.Security.Membership and Web.Security.Roles. For some reason Membership always produces the expected results but Roles seems to be a probl开发者_JAVA技巧em. When debugging the following code the result is different for roleExists1 and roleExists2.

bool roleExists1 = Roles.RoleExists("Administrator");
bool valid = Membership.ValidateUser(emailAddress, password);
bool roleExists2 = Roles.RoleExists("Administrator");

Can anyone suggest why roleExists1 is 'true' and roleExists2 is 'false'?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜