Saturday, 15 May 2010

c# - asp membership roles issue -



c# - asp membership roles issue -

i'm having issue when trying add together users roles using default membership provider. have asp.net schema installed on database , creating users works fine , creates users in dbo.users.

membership.createuser(username.text, password.text, email.text, null, null, true, out createstatus);

however when seek add together user role

roles.addusertorole(newuser.username, "administrators");

it keeps homecoming exception, inner exception

{"invalid column name 'roleid'.\r\ninvalid column name 'userid'.\r\ninvalid column name 'userid'.\r\ninvalid column name 'roleid'."}

not sure why claiming columns not exist when of membership tables exist in database.

this has had me scratching head past few hours...

any ideas help appreciated.

c# asp.net sql

No comments:

Post a Comment