Object required global.asa error: Difference between revisions

From DataFlex Wiki
Jump to navigationJump to search
mNo edit summary
m Changed from Web Programming to Web Applications category
 
(9 intermediate revisions by one other user not shown)
Line 1: Line 1:
===Objects not generated in global.asa file===
After migrating a web application from an earlier version as VDF12 you might get some error while trying to run the application for the first time. If you get an error along the lines of:
After migrating a web application from an earlier version as VDF12 you might get some error while trying to run the application for the first time. If you get an error along the lines of:
  Error Type: Microsoft VBScript runtime (0x800A01A8)
  Error Type: Microsoft VBScript runtime (0x800A01A8)
  Object required: 'oOrder' /Order/global.asa, line 124
  Object required: 'oOrder' /Order/global.asa, line 124
or
Microsoft VBScript runtime (0x800A01F9)
Invalid or unqualified reference /Order/global.asa, line 125
I might have an answer for you.
I might have an answer for you.


Line 18: Line 23:
  .Name="oOrder"
  .Name="oOrder"
or this one:
or this one:
  .Name=
  .Name=""
instead of this:
instead of this:
oOrder.Name="oOrder"
oOrder.Name="oOrder"


So what happened? The Studio in these days parses your sources in order to decide what to write to the global.asa file and how.
So what happened? The Studio in these days parses your sources in order to decide what to write to the global.asa file and how.
Line 26: Line 31:
Now things work differently, so we need to adjust the troubleshooting steps.
Now things work differently, so we need to adjust the troubleshooting steps.


====Is there a problem?====
First thing you should look for is any issues in the Problem Resolution Panel. '' verify the context menu to see that "Filter Warnings" is not checked ''  
First thing you should look for is any issues in the Problem Resolution Panel. '' verify the context menu to see that "Filter Warnings" is not checked ''  
If there are complaints in the panel fix them and try compiling afterwards.
If there are complaints in the panel fix them and try compiling afterwards.


====Start out fresh====
What if you still have this problem? Well it could be something else.
What if you still have this problem? Well it could be something else.
Let's make it easier for the parser and -instead of having it merge its results into an existing global.asa- feed it with an empty one.
Let's make it easier for the parser and -instead of having it merge its results into an existing global.asa- feed it with an empty one.
Line 34: Line 41:
Try compiling again to see it is fixed. (It probably is)
Try compiling again to see it is fixed. (It probably is)


====Multiple WBOs in one file====
Still the same problem?  
Still the same problem?  
Hmm.. you are not having multiple WebBusinessProcess objects in one file?
Hmm.. you are not having multiple WebBusinessProcess objects in one file?
Check your subclass settings if you are using these under Tools > Configure Workspace.
If that's the case isolate them and move each WBO to its own file.
Also make sure to check that your subclass settings are properly set (only if you are using these of course) under Tools > Configure Workspace.
 
====Class definitions in WBO====
Check your code to see if you have a class declaration within your WBO, The Studio's parser reports an error when it sees this construction and the Global ASA generator does not try to find the name of the WBO in this case which is why it is being set to "".
 
The answer is that if you take the class declaration outside of the WBO it will work.


====note====
====note====
Also beware that webservices no longer need an entry in the global.asa file. So if they are missing, then it is perfectly normal.
Also beware that webservices no longer need an entry in the global.asa file. So if they are missing, then it is perfectly normal.
Check the .wso file of the service in a texteditor if it is not working.
Check the .wso file of the service in a texteditor if it is not working.
This line might look like
This line might contain (the value is an actual studio metatag)
  Application=RenameThisSomething
  Application=RenameThisWorkspace
and should be the same as the setting in your global.asa
and should be the same as the setting in your global.asa
  <snip>
  <snip>
  ...
  ...
   WebAppServerSession.Initialize("YourAppName")
   WebAppServerSession.Initialize("Order")
  ...
  ...
  </snip>
  </snip>
so it should be:
so it should be:
  Application=YourAppName
  Application=Order
 
[[Category:Web Applications]]

Latest revision as of 14:10, 8 April 2020

Objects not generated in global.asa file

After migrating a web application from an earlier version as VDF12 you might get some error while trying to run the application for the first time. If you get an error along the lines of:

Error Type: Microsoft VBScript runtime (0x800A01A8)
Object required: 'oOrder' /Order/global.asa, line 124

or

Microsoft VBScript runtime (0x800A01F9)
Invalid or unqualified reference /Order/global.asa, line 125

I might have an answer for you.

First thing to do of course is to open the global.asa file. Our web application isn't able to map the VBscript object oOrder against our WebBusiness Process called oOrder. So we expect to find this:

<OBJECT RUNAT=Server SCOPE=Session ID=oOrder PROGID="WebAppServer.WebBusinessProcess.12.1">
</OBJECT>

and you might find this:

<OBJECT RUNAT=Server SCOPE=Session ID= PROGID="WebAppServer.WebBusinessProcess.12.1">
</OBJECT>
Watch the missing ID= bit 

or no declaration at all. Then in the Session_OnStart sub section you are likely to find this line:

.Name="oOrder"

or this one:

.Name=""

instead of this:

oOrder.Name="oOrder"

So what happened? The Studio in these days parses your sources in order to decide what to write to the global.asa file and how. In the good ol' days you would open the abdata file, search for the missing entry in question, fix it and begone with it. Now things work differently, so we need to adjust the troubleshooting steps.

Is there a problem?

First thing you should look for is any issues in the Problem Resolution Panel. verify the context menu to see that "Filter Warnings" is not checked If there are complaints in the panel fix them and try compiling afterwards.

Start out fresh

What if you still have this problem? Well it could be something else. Let's make it easier for the parser and -instead of having it merge its results into an existing global.asa- feed it with an empty one. Rename your global.asa file and copy a fresh one from your VDF .\Lib folder to your application's \AppHtml folder. Try compiling again to see it is fixed. (It probably is)

Multiple WBOs in one file

Still the same problem? Hmm.. you are not having multiple WebBusinessProcess objects in one file? If that's the case isolate them and move each WBO to its own file. Also make sure to check that your subclass settings are properly set (only if you are using these of course) under Tools > Configure Workspace.

Class definitions in WBO

Check your code to see if you have a class declaration within your WBO, The Studio's parser reports an error when it sees this construction and the Global ASA generator does not try to find the name of the WBO in this case which is why it is being set to "".

The answer is that if you take the class declaration outside of the WBO it will work.

note

Also beware that webservices no longer need an entry in the global.asa file. So if they are missing, then it is perfectly normal. Check the .wso file of the service in a texteditor if it is not working. This line might contain (the value is an actual studio metatag)

Application=RenameThisWorkspace

and should be the same as the setting in your global.asa

<snip>
...
 WebAppServerSession.Initialize("Order")
...
</snip>

so it should be:

Application=Order