i have one subfolder called MySubFolder in my web form project and i want that all the page in that folder will be protected by form authentication. so i search google to do it. i got a xml snippet which i need to put in my main web.config file. the xml snippet as follows
<location path="MySubFolder">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
so i want to know that does it protect all files in my subfolder? plzz let me know. thanks
Yes, it protects all folder content. And sub-folders’ content too (except case when you allow access to sub-folder manually). I.e. with you configuration and next project structure
only authorized users will have access both to
MySubFolder/Test.aspxandMySubFolder/MySubFolder2/Test2.aspx.