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 asp.net 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)
                 GetObjectContext.SetComplete
           End Function

----------------------
in aspx:

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

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

Cheers!!
0
 
apinyakuAuthor Commented:
System.Runtime.InteropServices.Marshal.ReleaseComObject did it. Thank you very much!
0
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.