为什么我会收到 403?

Why am I getting a 403?

我已经发布了 ClickOnce 申请。

应用程序从 MyApplication/MyApplication.application 下载并正确安装。

但是,如果他们访问 MyApplication/setup.exe 以自动安装先决条件,然后 运行 应用程序,他们将获得 403.

403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied.

在处理程序映射中,cgi-exe 被禁用。我添加了一个模块映射如下:

Name: setup.exe
Path: setup.exe
State: Enabled
Path type: unspecified
Handler: StaticFileModule
Entry type: Local
Access required by the handler: Script
Specify verbs to be handled: all verbs
[Unchecked] Invoke handler only if request is mapped to...

应用程序池在文件夹上有 Full Control 个,在 Application Pool Identity 上有 运行 个。

我错过了什么?

您可以在IIS日志中找到原因。

感谢 IIS 论坛上的 Lex Li。