允许在IIS7中下载MDB

Bry*_*wis 5 ms-access iis-7 download

目前,如果我托管Access .MDB文件以允许用户下载,IIS7会抛出404错误.我知道文件在那里,权限很好.它似乎是一个Handler问题,但我无法弄清楚如何更改处理程序以允许下载MDB文件.我假设我需要在web.config的Handlers部分添加一些内容,但我不确定语法.

谢谢.

Yor*_*ing 8

或者,如果您不想修改系统范围的配置文件,可以在web.config中将以下行添加到该部分:

<remove fileExtension=".mdb" />
<add fileExtension=".mdb" allowed="true"/>
Run Code Online (Sandbox Code Playgroud)

例如,您的Web.config应该类似于:

<configuration>
  <system.webServer>
    <security>
      <requestFiltering>
        <fileExtensions allowUnlisted="true" >
          <remove fileExtension=".mdb" />
          <add fileExtension=".mdb" allowed="true"/>
        </fileExtensions>
     </requestFiltering>
   </security>
 </system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)

另请参阅http://www.adamwlewis.com/articles/iis-7-not-serving-files-4047-error.


Bry*_*wis 3

好的,找到了。

只需删除以下行:

<add fileExtension=".mdb" allowed="false" />
Run Code Online (Sandbox Code Playgroud)

在 \Windows\System32\inetserv\config\applicationHost.config 文件的“requestFiltering”部分中。