Solved

Role authentication not working right

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 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

13 Experts available now in Live!

Get 1:1 Help Now