Activex Dll added in Component Services does not stop when using it in aspx

Hi experts,

  I have tried creating an Activex DLL project using VB6 with a simple hello function in it. After compiling, I registered it in Component Services. It works well when I use it in asp classic page, but when I call it inside I have noticed that the object in Component services does not stop and the number of objects running adds up when a new browser accessed the same function.  I have tried  GetObjectContext.SetComplete but no changes. Please help. Thanks.

           Public Function Hello(ByVal name As String) As String
                  Hello = Testing(name)
           End Function

in aspx:

            Dim testcom = CreateObject("TestCom.test")
            testcom = nothing
Who is Participating?
Bob LearnedConnect With a Mentor Commented:
Are you releasing your objects:  testcom = Nothing?  Are you releasing COM objects:  Marshal.ReleaseCOMObject(testcom)?

1. Do you created Dispose() method
2. Is that your class implements IDisposable?

apinyakuAuthor Commented:
System.Runtime.InteropServices.Marshal.ReleaseComObject did it. Thank you very much!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.