Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Role authentication not working right

Posted on 2008-10-10
3
Medium Priority
?
224 Views
Last Modified: 2013-11-07
in my web.congif file in a subfolder to the root, I have the attached Code Snippet.

Based on this, all users should be denied access except for those possessing the role of OfficeStaff.
This is not happening for some reason. Thanks for the assistance.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web>
    <authorization>
      <allow roles="OfficeStaff" />
      <deny users="*" />
    </authorization>
  </system.web>
</configuration>

Open in new window

0
Comment
Question by:wilcor14
  • 2
3 Comments
 
LVL 18

Expert Comment

by:David Robitaille
ID: 22688099
try this
i added a <deny users="?"/>
it deny the unautentified users

 

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web>
    <authorization>
      <deny users="?"/>
      <allow roles="OfficeStaff" />
      <deny users="*" />
    </authorization>
  </system.web>
</configuration>

Open in new window

0
 
LVL 18

Accepted Solution

by:
David Robitaille earned 2000 total points
ID: 22688588
i just saw it was a subfolder...
I checked and the problem is not in that web.config it is exactly like mine, an mine work.
Did you try to do an iis reset to make sure the file is read by the web server?
0
 

Author Closing Comment

by:wilcor14
ID: 31505058
That was it. Thanks.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question