if you are trying to show images in IIS 7.5, did you notice that there are two ways (the first is here) to use <location> tag that it is even confusing for me.
Anyway this might be helpful if you are using IIS 7.5.
The sample below is working for a MVC application targeting NET 4.5, which will display a folder for a group and hide it for another group.
<configuration>
<system.web>
<!-- allow only windows users to use app (no anonymous will access it)-->
<authentication mode="Windows" />
<authorization>
<deny users="?" />
</authorization>
<system.web>
<!-- main security, allowing only groups: Clowns and Nerds -->
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<security>
<authorization>
<remove users="*" roles="" verbs="" />
<add accessType="Allow" roles="Domain\Clowns" />
<add accessType="Allow" roles="Domain\Nerds" />
</authorization>
</security>
<defaultDocument enabled="false" />
</system.webServer>
<!-- Here we show /images_for_clowns folder ONLY to Clowns group -->
<location path="images_for_clowns" inheritInChildApplications="false">
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<security>
<authorization>
<clear />
<remove users="*" roles="" verbs="" />
<add accessType="Allow" roles="Domain\Clowns" />
</authorization>
</security>
<defaultDocument enabled="false" />
</system.webServer>
</location>
<!-- Here we show /images_for_nerds folder ONLY to Nerds group -->
<location path="images_for_nerds" inheritInChildApplications="false">
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<security>
<authorization>
<clear />
<remove users="*" roles="" verbs="" />
<add accessType="Allow" roles="Domain\Nerds" />
</authorization>
</security>
<defaultDocument enabled="false" />
</system.webServer>
</location>
Maybe another trick would be using
<location path=".">
<system.webServer>...
in order to set the root folder permissions! Hopefully this can help more people.