从 IIS 下载 MDB(Access)文件

发布于 2024-08-06 14:50:08 字数 331 浏览 3 评论 0原文

这个问题可能在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

合约呢 2024-08-13 14:50:08

我不认为这纯粹是服务器端的问题。我认为不同的浏览器也可能以不同的方式处理它。

压缩 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文