Solved

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

Posted on 2011-03-08
6
1,687 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 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