Hello,
I'm using webforms and I'm trying to add users to roles using the following code:
- Roles.AddUserToRole(userTxt.Text, roleTxt.Text);
So, I added these lines to web.config of the Admin role
- <?xml version="1.0"?>
- <configuration>
- <system.web>
- <roleManager
- enabled="true"
- cacheRolesInCookie="true" >
- </roleManager>
- <authorization>
- <allow roles="Administrator"/>
- <deny users="*"/>
- </authorization>
- </system.web>
- </configuration>
I would appreciate any kind of help, thank you in advance.
Suthish NairRank #92 · 22.8K pointsPosted Aug 4, 2016, 4:17 AM EDT
1 short reply
DealyRank #9,518 · 205 pointsPosted Aug 4, 2016, 9:50 PM EDT