简体   繁体   中英

Classic ASP Application variables in IIS7

I've got a classical ASP website in which I store some information inside the Application object. The application runs perfectly in IIS6 and IIS5 but not in IIS 7.

In Global.asa Application.On_start I set some variables. For exemple:

Application("variable1") = 1

And on page x.asp I use the variable in a non-standard way:

newVariable = variable1
response.write newVariable

And on IIS6 I see the number 1. But on IIS7 newVariable has no value.

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. So I want to know if there is a way to make IIS7 more compatible with old ASP pages.

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. Even in more than 500 pages this will not take much more than a few minutes. Then you no longer have to depend on a quirck in your IIS that can stop working with any update or configuration change.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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