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.