web.config 上的 ASP.NET HttpHandler 和 scriptProcessor 路径

发布于 2024-07-26 05:12:50 字数 556 浏览 1 评论 0原文

我在 web.config 上定义 http 处理程序:

<add name="nsi" path="i.nsi" verb="GET" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0" />

scriptProcessor 指向 Framework64 文件夹,因为运行它的服务器是 64 位。 然而,我们的开发机器是32位的。 这意味着处理程序不会运行,除非我签出 web.config 并将 Framework64 更改为 Framework

有没有办法编写它以便它可以在任何机器上运行? 32位和64位都有吗? 环境变量或 MSBuild 脚本可以提供帮助吗?

I'm defining http handlers on my web.config:

<add name="nsi" path="i.nsi" verb="GET" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0" />

The scriptProcessor points to the Framework64 folder as the server running this is 64bit.
However, our development machines are 32bit. Which means the handler won't run unless I checkout the web.config and change Framework64 to Framework.

Is there a way to write this so that it runs on any machine? both 32bit and 64bit?
An environment variable or an MSBuild script that can help?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

下雨或天晴 2024-08-02 05:12:50

你尝试过这样的事情吗?

scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll"

Did you try something like this ?

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