设置IIS允许下载.config文件

时间:2022-03-13 19:09:29

<configuration>

<system.webServer>
        <security>
            <requestFiltering>
                <fileExtensions>
                    <remove fileExtension=".config" />
                    <add fileExtension=".pdb" allowed="true" />
                    <add fileExtension=".config" allowed="true" />
                </fileExtensions>
            </requestFiltering>
        </security>
        <staticContent>
            <mimeMap fileExtension=".pdb" mimeType="application/octet-stream" />
        </staticContent>
    </system.webServer>

</configuration>