I am trying to write an ASP.NET site that will make use of a COM object. I have written an app in VB.NET that works using this object. The app runs great. I added the ActiveHomeScriptLib as a reference to my ASP.NET project and I can access its properties via Intellitype, however although no error is returned it does not work. Also, I did enable aspcompt in the page and it made no difference.

Can anyone point me in the rigth direction?

Code:
Imports ActiveHomeScriptLib



Imports System



Module Module1

    Dim WithEvents ActiveHomeObj As ActiveHome



    <MTAThread()> Sub Main()



        'create ActiveHome object

        Try

            ActiveHomeObj = CreateObject("X10.ActiveHome")

        Catch exc As Exception

            Console.WriteLine("err num: " & Str(Err.Number) & " '" & exc.ToString & "'")

        Finally

        End Try





        'send a1 on

        Try

            ActiveHomeObj.SendAction("sendplc", "b2 on")

        Catch exc As Exception

            Console.WriteLine("err num: " & Str(Err.Number) & " '" & exc.ToString & "'")

        Finally

        End Try





        'wait for events

        Dim nRead

        While True

            System.Threading.Thread.Sleep(0)

            nRead = Console.Read()

        End While







    End Sub



    'events from ActiveHome: write out received event

    Sub ActiveHome_RecvAction(ByVal bszRecv As Object _

                            , ByVal vParm1 As Object _

                            , ByVal vParm2 As Object _

                            , ByVal vParm3 As Object _

                            , ByVal vParm4 As Object _

                            , ByVal vParm5 As Object _

                            , ByVal vReserved As Object) Handles ActiveHomeObj.RecvAction



        Console.WriteLine("RecvAction: " & bszRecv & " " & vParm1 & " " & vParm2 & " " & vParm3 & " " & vParm4 & " " & vParm5)

    End Sub





End Module