设置IIS允许下载.config文件

2/11/2016来源:ASP.NET技巧人气:3055

<?xml version="1.0" encoding="UTF-8"?>

<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>