Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
Role Manager feature has not been enabled (Identity)
Dealy
Aug 4 2016 6:50 AM
2k
Reply
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.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Xamarin Multi Select Spinner
like/dislike button working only the first time