473,325 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Deny acces to users that are not in any role

Hi NG!

Is it possible to deny access to a (logged in) user that is not in any
role? Placeholders like <deny roles="?"/don't seem to be possible.

Regards
Markus

<location path="Protected.aspx">
<system.web>
<authorization>
<allow roles="Administrator"/>
<deny roles="Staff"/>
</authorization>
</system.web>
</location>

Sep 17 '06 #1
2 2719
As long as you do not have an allow rule higher up, it will automatically
deny all roles that are not allowed. If you have a generic rule higher that
allows access, then you do have to explicitly deny. You can deny generically
for roles ... but you can for users. Thus, this is valid:

<location path="Protected.aspx">
<system.web>
<authorization>
<allow roles="Administrator"/>
<deny users="*"/>
</authorization>
</system.web>
</location>

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
"Markus Palme" <Ma*********@googlemail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi NG!

Is it possible to deny access to a (logged in) user that is not in any
role? Placeholders like <deny roles="?"/don't seem to be possible.

Regards
Markus

<location path="Protected.aspx">
<system.web>
<authorization>
<allow roles="Administrator"/>
<deny roles="Staff"/>
</authorization>
</system.web>
</location>

Sep 17 '06 #2
<deny users="*"/>

Thanks, that is the solution.

Sep 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: spike | last post by:
I tried to upload a .htaccess-file to the directory that i wanted to protect. This is what I wrote in it: ------------------------------------------------ <Limit GET> order deny,allow deny from...
0
by: Kona | last post by:
Hello, I would like to deny acces to the "data sources" tab in Excel. This tab is locate under Data/Import External Data/New Database query. But I would like to keep access to the other tab as...
2
by: Galahad | last post by:
I have a current requirement to deny access to a particular website from a list of domains. I can add these domains to a deny list in IIS, however that doesn't give me the ability detect these...
4
by: Kona | last post by:
Hello, I would like to known if it is possible to limit acces to a UDB database on Solaris system through db2connect to only specified clients ? My client is a db2connect on Windows platform. ...
3
by: david | last post by:
Hi, I have a asp.net site running on an MS Access database this is, for better or worse, stored under the webroot. How can I lockout the database directory to prevent anyone from...
4
by: Dan | last post by:
hi ng. i have a strange behaviour when i want to control who can access a web application by setting web.config like: <authorization> <allow users="DOMAIN\ACCOUNT,..." /> <deny users="*" /> ...
4
by: Jake Peters | last post by:
I'd like to know how to get a users various table privilages from a sql server (insert/delete/update), so that i can set controls to behave accordingly (read only, hidden, disable "insert" button,...
5
by: profdotnet | last post by:
Below is the code of web.config file: <configuration> <system.web> <authentication mode="Forms" /> <authorization> <allow users="Admin"/> <deny users="Jack,Mary" /> <deny users="?">...
0
by: Douglas J. Badin | last post by:
Hi, The problem with Authorization is it stops at the first match and doesn't permit Grouping. On the Web Site, I am trying to Secure Page Access and SiteNaviagation by implementing the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.