Last active
September 9, 2021 15:24
-
-
Save glebov21/a311013dba1d83b8076bee2339dabf79 to your computer and use it in GitHub Desktop.
Allow to download all files from iis folder (applicationHost.config -> allowSubDirConfig="false")
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<location path="ForDownload" allowOverride="false" inheritInChildApplications="false"> | |
<system.webServer> | |
<security> | |
<authorization> | |
<!-- Allow all users access to the Public folder --> | |
<remove users="*" roles="" verbs="" /> | |
<add accessType="Allow" users="*" roles="" /> | |
</authorization> | |
<requestFiltering> | |
<hiddenSegments> | |
<clear /> | |
</hiddenSegments> | |
<fileExtensions> | |
<clear /> | |
</fileExtensions> | |
</requestFiltering> | |
</security> | |
<directoryBrowse enabled="true" /> | |
<defaultDocument> | |
<files> | |
<!-- When requesting a file listing, don't serve up the default | |
index.html file if it exists. --> | |
<clear /> | |
</files> | |
</defaultDocument> | |
<handlers> | |
<clear /> | |
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" /> | |
</handlers> | |
<!-- Map all extensions to the same MIME type, so all files can be | |
downloaded. --> | |
<staticContent> | |
<clear /> | |
<mimeMap fileExtension="*" mimeType="application/octet-stream" /> | |
</staticContent> | |
</system.webServer> | |
</location> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment