Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Problem with initializing adk agent only oncein VB6 script.

DynaMight Leader
DynaMight Leader

We have an application of which one part is written in VB6 using ASP and want to instrument it with the ADK. We are using the VB6 Instrumentation Wrapper which is working fine.

Our Problem is that we do not find a way to initialize the ADK agent only once. It gets initialized every time the script is called, so we get more and more agents connected to the server.

Here is a description of the application, I attached the mentioned example files:

So, our application is based on old pure ASP pages (do not mislead with ASP.NET). In the „example.asp“ you can see very basic example, that I have used for my tests (it is working).

The ASP is hosted on IIS (version 7.5 and above – depending on the system used).

As you can see from the example, the ASP page creates special component called „C6W3TBLC.CClient” this is our component written in original VB6. It cannot be updated to any future visual basic version, because it uses technologies that are already gone and are not more supported in any other version of visual basic.

The sources of C6W3TBLC are littlebit complicated and I don’t know if I can send it to you, but in general it does some initialization and then our “Initialize” call from the ASP page is this one:

Public Function Initialize() As Long
Dim RC As Long
On Error GoTo ErrorHandler
RC = m_Query.Initialize()
Initialize = RC
Exit Function

Initialize = -1
Exit Function
End Function

where the “m_Query” object in the code is always other special COM component defined in the ASP. In our example it is this line:

BL_CLASS.QueryObjectName = "DynaTraceInit.DTInit"

This must be a class registered in windows component services.

Sources and project file for the DynaTraceInit.DTInit class are included – very simple component created only for this purpose.

Can anyone think of a way in which we can initialize the ADK agent only once, despite the lack of persistence in the VB6 script?

Dynatrace Certified Master, AppMon Certified Master - Dynatrace Partner -

Dynatrace Guru
Dynatrace Guru

Hi Patrick

I just saw your post - sorry for having missed that. We just did a great performance clinic on the usage of the ADK yesterday - the recording can be found here in case you are interested:

I will forward your question to Kelvin who did the webinar with me. Maybe he has some thoughts on it


Thanks for the input andi, I will check the webinar. Would be great if Kelvin had some thoughts on the matter.

Dynatrace Certified Master, AppMon Certified Master - Dynatrace Partner -

Dynatrace Champion
Dynatrace Champion

hi Patrick,

could you please show us a screenshot of your agent overview dashlet showing the full agent names?

because having multiple calls to initialize in the same process should actually be no problem, as it's reusing the already initialized agent in the process.

however, if you're having multiple processes (which I suspect), then you'll end up with an agent for each process. however, that's per design and cannot be avoided as there has to be an agent for each process that you want to monitor.

HTH, Christian

The latter is the case, we see multiple agents. So I assume the IIS starts the script in a new process every time its called.

Is there a workaround we could implement to get the communication done with one agent? I assume the only thing that would work is to build a proxy script in between like with the webserver primary/secondary agent?

Dynatrace Certified Master, AppMon Certified Master - Dynatrace Partner -