简体   繁体   English

IIS7中的经典ASP应用程序变量

[英]Classic ASP Application variables in IIS7

I've got a classical ASP website in which I store some information inside the Application object. 我有一个经典的ASP网站,我将一些信息存储在Application对象中。 The application runs perfectly in IIS6 and IIS5 but not in IIS 7. 该应用程序在IIS6和IIS5中运行完美,但在IIS 7中运行不正常。

In Global.asa Application.On_start I set some variables. 在Global.asa Application.On_start中,我设置了一些变量。 For exemple: 举个例子:

Application("variable1") = 1

And on page x.asp I use the variable in a non-standard way: 在页面x.asp上我以非标准方式使用变量:

newVariable = variable1
response.write newVariable

And on IIS6 I see the number 1. But on IIS7 newVariable has no value. 在IIS6上,我看到数字1.但在IIS7上,newVariable没有任何价值。

I now the correct form is 我现在正确的形式是

newVariable = Applicaion("variable1")
response.write newVariable

But the site is now 14 years old and has more than 500 pages. 但该网站现已有14年历史,有超过500页。 So I want to know if there is a way to make IIS7 more compatible with old ASP pages. 所以我想知道是否有办法让IIS7与旧的ASP页面更兼容。

Thanks 谢谢

Not that i know of but this can be fixed with a simple search and replace in one action with eg Sublime Text editor or any other good recent editor. 不是我所知道的,但这可以通过简单的搜索来修复,并在一个动作中用例如Sublime Text编辑器或任何其他好的最近编辑器替换。 Even in more than 500 pages this will not take much more than a few minutes. 即使在500多页中,这也不会花费超过几分钟的时间。 Then you no longer have to depend on a quirck in your IIS that can stop working with any update or configuration change. 然后,您不再需要依赖IIS中可以停止处理任何更新或配置更改的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM