Solved

Role authentication not working right

Posted on 2008-10-10
3
214 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 500 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

919 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now