G
Guest
Guys,
I'm using VS 2005 to develop this Web Application and have made use of Form
authentication of ASP.Net Membership/Role module.
My application is running fine in development mode, but in certain time I'll
get following errors during compilation:
'RemoveUserFromRole' is not a member of 'Roles'.
'AddUserToRole' is not a member of 'Roles'.
'GetRolesForUser' is not a member of 'Roles'.
And when I try to Publish the Website, it will throw above errors and unable
to publish. But when I manually copy the code to local IIS Virtual Directory,
it runs without any error. What is the problem here?
This is my sample code:
CType(Me.LoginView1.FindControl("ListBox1"), ListBox).DataSource
= Roles.GetRolesForUser(User.Identity.Name)
Me.LoginView1.FindControl("ListBox1").DataBind()
I'm using VS 2005 to develop this Web Application and have made use of Form
authentication of ASP.Net Membership/Role module.
My application is running fine in development mode, but in certain time I'll
get following errors during compilation:
'RemoveUserFromRole' is not a member of 'Roles'.
'AddUserToRole' is not a member of 'Roles'.
'GetRolesForUser' is not a member of 'Roles'.
And when I try to Publish the Website, it will throw above errors and unable
to publish. But when I manually copy the code to local IIS Virtual Directory,
it runs without any error. What is the problem here?
This is my sample code:
CType(Me.LoginView1.FindControl("ListBox1"), ListBox).DataSource
= Roles.GetRolesForUser(User.Identity.Name)
Me.LoginView1.FindControl("ListBox1").DataBind()