从 IIS 下载 MDB(Access)文件
这个问题可能在 ServerFault 上问得更好,但由于这与编程项目有关,所以我会在这里问。
简而言之,如何配置 IIS 以允许我下载 Access (.MDB) 文件,就像下载 .HTML、.EXE 等文件一样?
我尝试过从 mime 类型中取出 MDB,将扩展名更改为 .DAT,告诉我的本地目录将 .MDB 文件视为二进制/八位字节流文件,但没有任何效果。我仍然获得“(401)未经授权”的访问权限。
我做错了什么?
编辑:我一问,我就明白了。我没有授予“所有人”对该文件的读取权限。这样做并删除了 .MDB 应用程序映射,然后它就失效了。
This question might be better asked over on ServerFault, but since this is related to a programming project, I'll ask here.
Simply put, how do I configure IIS to let me download an Access (.MDB) file the same way it lets me download .HTML, .EXE, etc. files?
I've tried taking MDB out of the mime types, changing the extension to .DAT, telling my local directories to treat .MDB files like binary/octet-stream files, yet nothing works. I still get a "(401) Unauthorized" access.
What am I doing wrong?
EDIT: Figures that as soon as I ask, I figure it out. I had not given "Everyone" read permission on the file. Did that and removed the .MDB Application Mapping, and it wored.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不认为这纯粹是服务器端的问题。我认为不同的浏览器也可能以不同的方式处理它。
压缩 access 数据库并让用户下载 zip 文件怎么样?我想说大多数用户都有能力做到这一点。
I don't think this is purely a server-side issue. I think different browsers may handle it different ways as well.
How about zipping up the access database and letting users download the zip file? I'd say that most users out there have the ability to do this.
你没有做错任何事。 IIS 禁止下载 .mdb 文件。以下是供您使用的参考:
You are not doing anything wrong. IIS is forbidding download of .mdb files. Here are ref's for your use: