Last post Jul 05, 2016 07:23 AM by Nan Yu
Jul 04, 2016 07:26 PMfirstname.lastname@example.org|LINK
I took a couple of years off from developing and now everything is different. I cannot get user roles to work on my website. I am using VS 2013 express. SQL 2014 Express. I have searched the internet and there seems to be a serious lack of documentation
on this. I have been at this for days. My connection string is correct. I can access user information but anytime I try to access role i.e. (user.IsInRole("x") I get this error: An error occurred while attempting to initialize a System.Data.SqlClient.SqlConnection
object. The value that was provided for the connection string may be wrong, or it may contain an invalid syntax.
I must be missing something because this should not be this hard.
Thanks in Advance
Jul 05, 2016 07:23 AM|Nan Yu|LINK
Have you correctly config MembershipProvider and RoleProvider in web.config . Please refer to below article for more details :