I am trying to grant access to anyone to a specific page in IIS. I have main folder with the .NET Framework website in C# in this folder I have Web.config file which has
<authentication mode="Windows">
</authentication>
</system.web>
<authorization>
<deny users="?" />
<deny users="*" />
<allow roles="MySpecial Group" />
</authorization>
</system.web>
Also in this folder I have another folder with a page that I want to be accessible to anyone who does not belong to this group. Can someone please help me how to configure this Web.config file or how do I configure one inside my folder's page to make it accessible.
main site
|__Web.config //this is the main Web config with deny-all allow-mygroup
|__index.asp
|__my special page //this is the folder I want to be accessible to anyone
| |__default.aspx
| |__default.aspx.cs
| |__Web.config
|__page2
|__page3
if user is not in group goes to main site it will show no access, and if user goes to main site/my special page it should work. I am using Windows Authentication in an intranet website
EDIT: Figured out with help @Lex Li I was missing just one thing, in main Web.config deny and allow rules are overwriting from top to bottom so i had to add the location path that needs another permission before the global permissions
<location path="my special page">
<system.web>
<authorization>
<allow users="?" /> <!-- This will overwrite bottom rules -->
</authorization>
</system.web>
</location>
<authentication mode="Windows">
</authentication>
</system.web>
<authorization>
<allow roles="MySpecial Group" /> <!-- This needs to be on top over next deny rules, otherwise this will have no effect -->
<deny users="?" />
<deny users="*" />
</authorization>
</system.web>