Solved

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

Posted on 2011-03-08
6
1,738 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Turn Insights Into Action

You’ve already invested in ITSM tools, chat applications, automation utilities, and more. Fortify these solutions with intelligent communications so you can drive business processes forward.

With xMatters, you'll never miss a beat.

 

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

691 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