Hello,
 
I'm using webforms and I'm trying to add users to roles using the following code:
- Roles.AddUserToRole(userTxt.Text, roleTxt.Text);  
 
At first, I was getting the message "
The Role Manager feature has not been enabled."
 
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>  
 
 Now, I get this parser error message "
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS."
 
I would appreciate any kind of help, thank you in advance.