• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1903
  • Last Modified:

ASP - Microsoft VBScript compilation error '800a0411' Name redefined

I am migrating an ASP app to IIS6 from IIS5 it would appear that the global application object is handled differently. In the app currently the there is an include line for each page to include the global variable e.g. <!-- #include file="inc/applicationVariables.asp" -->

However when you go from one page to another I get the error in the title. It appears it is moaning about a constant value being changed (I guess 'cus it's re-reading it..?) However if I remove the include file line then I get an error saying:

Microsoft VBScript runtime error '800a01a8'
Object required: 'application(...)'
0
Lico_w
Asked:
Lico_w
  • 4
  • 2
2 Solutions
 
Paul JacksonCommented:
Remove the constant out into another file and only include that in your initiaal page, or just put the constant at the top of your initial page.
0
 
Lico_wAuthor Commented:
No good, when I do either it states my variables haven't been declared when I move to the next page. For example:

Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'applicationRoot'

Any ideas how I can set these global variables without re-declaring them?
0
 
Paul JacksonCommented:
Instead of using a global variable in this way use a Application variable if the variable/constant is the same for all users or session variable if it changes depending on the user.

i.e

Application("applicationRoot") = "somevalue"
or
Session("applicationRoot") = "somevalue"

You should have no problems with this being in the include file no matter how many times the include file is copied in.

When you want to retrieve the value :

dim myVariable = Application("applicationRoot")
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Lico_wAuthor Commented:
OK thanks, will award points soon, but want to keep Q open for a couple of days whilst I reconfigure.
0
 
Lico_wAuthor Commented:
This issue was related to the fact the global.asa was not being seen as the global variables for the app. I had to configure a Virtual Directory to resolve the issue. That allowed me to declare the const values
0
 
Lico_wAuthor Commented:
.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now