Last post Feb 03, 2014 07:35 AM by SeeDosRun
Jan 30, 2014 11:25 AM|SeeDosRun|LINK
I created a role in the asp.net configuration tool - Admin
I created a user - John
In my project I created a folder called "Admin" with a file called "admin.aspx"
I added "admin.aspx" to my web.sitemap file
<siteMapNode url="~/Admin/admin.aspx" title="Admin" description="Admin" roles="Admin"/>
I then added a web.config to the "Admin" folder
<deny users="*" />
When I log in as John I can see the link to admin.aspx but when I click on the link I get redirected to login.aspx because I don't have rights to view that page
So I checked if I was logged in as an Admin
User.IsInRole("Admin").ToString() + " " + User.Identity.IsAuthenticated.ToString()
Which returned true true.
As a test I changed the web.config in the "Admin" folder to
And users with the role of "User" can see the page.
Feb 03, 2014 07:35 AM|SeeDosRun|LINK
So I think I solved the problem.
It appears the order in which I performed the steps was incorrect.
It should be