在IIS7中允许MDB下载 [英] Allow MDB Downloads in IIS7

查看:217
本文介绍了在IIS7中允许MDB下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Currently if I am hosting an Access .MDB file to allow users to download, IIS7 is throwing a 404 error. I know the file is there and the permissions are fine. It appears to be a Handler issue, but I cannot figure out how to change the handler to allow downloading of MDB file. I assume I need to add something to the Handlers section of the web.config, but I am unsure of the syntax.

谢谢。

推荐答案

/ p>

Or, if you don't want to modify a system-wide configuration file, you could add the following lines to that section in your web.config:

<remove fileExtension=".mdb" />
<add fileExtension=".mdb" allowed="true"/>

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

For example your Web.config should be similar to this:

<configuration>
  <system.webServer>
    <security>
      <requestFiltering>
        <fileExtensions allowUnlisted="true" >
          <remove fileExtension=".mdb" />
          <add fileExtension=".mdb" allowed="true"/>
        </fileExtensions>
     </requestFiltering>
   </security>
 </system.webServer>
</configuration>

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

这篇关于在IIS7中允许MDB下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆