r/visualbasic • u/data1025 VB.Net Beginner • Jul 16 '20
ASP.NET VB Role Manager (SQL stopped working after enabled)
Hi VB Programmers:
I have a web app on my IIS server which is domain connected. I would like to enable role manager so I can use the command If System.Web.Security.Roles.IsUserInRole("DOMAIN\SecGroup1")= "true" Then
so I attempted to place this into my code, but it errored asking me to enable role manager.
After enabling role manager in my web.config file, my SQL connection stopped working.
My SQL connection is simply under ConnectionStrings in web.config which is a string of data source (server name), ID, Password, and provider name.
(Edit: my SQL database has no roles, tables, or anything related to security. I've had this web app for internal use since ASP 2.0 and this was working at one time. I have since moved to ASP 4.0 and then 4.6.1. I just need the ability to verify if someone is a member of AD. Part of my app already reads/writes to AD fields, if that helps.)
What do I need to do to make SQL work again with role provider?
1
u/andrewsmd87 Web Specialist Jul 16 '20
Do you have a version of the config file before hand? What error do you get specifically. What does your connection string look like now?