Web.Config allow access to certain paths

If you’ve locked down access to your website but what your login page to pick up a stylesheet from a sub folder then you need to a add a location tag to your web.config to grant access

<location path="Styles">
    <system.web>
        <authorization>
            <allow users="*" />
        </authorization>
    </system.web>
</location>
<location path="Images">
    <system.web>
        <authorization>
            <allow users="*" />
        </authorization>
    </system.web>
</location>

Leave a Reply