Link to home
Start Free TrialLog in
Avatar of wilcor14
wilcor14Flag for United States of America

asked on

Role authentication not working right

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

Avatar of David Robitaille
David Robitaille
Flag of Canada image

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

ASKER CERTIFIED SOLUTION
Avatar of David Robitaille
David Robitaille
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wilcor14

ASKER

That was it. Thanks.