Quantcast
Channel: Configuration & Scripting
Viewing all articles
Browse latest Browse all 780

Adding Deny and Allow element at the system.web/authorization level using appcmd

$
0
0

I have been trying to add a deny and allow at the system.web/authorization, but have been unable to get it to work.  I am trying to add a deny anonymous, and allow all users.  When I use Genereate Script in the GUI it provides the following script: 

appcmd.exe set config -section:system.web/authorization /+"[users='?']" /commit:webroot

appcmd.exe set config -section:system.web/authorization /+"[users='*']" /commit:webroot

When I run this script it allows both lines.  I have been unable to find how to set the deny vs allow.  Searching around I found this:

appcmd set config /section:system.webServer/security/authorization /+"[accessType='Deny',users='*']"

But when I try adding the accessType'=deny into my line it fails:

appcmd.exe set config -section:system.web/authorization /+"[accessType='deny',users='?']" /commit:webroot
ERROR ( message:Unknown attribute "accessType". )

Any help would be great.


Viewing all articles
Browse latest Browse all 780

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>