470,849 Members | 1,187 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

Overloading Role Provide Problem

Greetings All,

I have been triying to impliment a new role provider and i'm experiencing
weird behavior. I have tried custom code (as well as code samples from
microsoft) and have experienced similiar results.

here is a like to the code that I used directly from microsoft.


Here is what i'm experencing...

whenever i call the isinrole fucntion this way from my usercontrol

Roles.IsUserInRole(Page.User.Identity.Name.ToStrin g,"Rolename")

the GetRolesForUser is actually called in the new role provider.

However, if i call the function this way


it calls the IsUserInRole correctly.

So, it appears that i can only get to the right function if i hard code the
username. but, if i try to get it from the Page.User.Identity.Name.ToString
variable, it does not work (even though this variable holds the correct

Is there any reason why the GetRolesForUser is called? i don't understand
why this is so and i never called it.
May 29 '06 #1
0 753

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

17 posts views Thread by Terje Slettebų | last post: by
33 posts views Thread by Jacek Generowicz | last post: by
31 posts views Thread by | last post: by
15 posts views Thread by lordkain | last post: by
3 posts views Thread by y-man | last post: by
14 posts views Thread by Pramod | last post: by
3 posts views Thread by abhighat4214 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.