web.config 上的 ASP.NET HttpHandler 和 scriptProcessor 路径
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你尝试过这样的事情吗?
Did you try something like this ?