Hi,
you can use <location> configuration tag, and <allow users="?"/> to allow anonymous users only or use <allow users="*"/> for all users:
<configuration><location path="Path/To/Public/Folder"><system.web><authorization><allow users="?"/></authorization></system.web></location></configuration>
Change the configuration according to your requirement. Hope this will help you.
thanks