Solved

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

Posted on 2011-03-08
6
1,617 Views
Last Modified: 2012-05-11
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
Comment
Question by:Lico_w
  • 4
  • 2
6 Comments
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 35069331
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
 

Author Comment

by:Lico_w
ID: 35069553
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
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 250 total points
ID: 35070157
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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:Lico_w
ID: 35084861
OK thanks, will award points soon, but want to keep Q open for a couple of days whilst I reconfigure.
0
 

Assisted Solution

by:Lico_w
Lico_w earned 0 total points
ID: 35313327
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
 

Author Closing Comment

by:Lico_w
ID: 35356811
.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question