Thanks Alain for your answer
It seems more complicated than usual.
I moved addHandler in ABMApplication with the way you suggested
srvr.Initialize(srvrName) ' Here is the initialize of the server
srvr.AddWebSocket("/ws/" & AppName, "ABMApplication")
srvr.AddHandler("/" & AppName & "/MainPage/conn1", "conn1", False) 'lineax
but not working, the Sub Handle in conn1 is raised only with
srvr.AddHandler("/conn1", "conn1", False) 'lineax
but the CallSub2 not work.....same problem as before.
I also added to MainPage the reference to "conn1" but Sub Handle in conn1 is never activated.
It seems to work only in this way:
in ABMApplication:
srvr.Initialize(srvrName) ' Here is the initialize of the server
srvr.AddWebSocket("/ws/" & AppName, "ABMApplication")
srvr.AddHandler("/conn1", "conn1", False) 'lineax
In the MainPage i have create the public targetmodule object and initializes this with "Me"
In conn1 create a reference to MainPage and and just so CallSub2 work.....
but it does not know if the procedure is correct, in the sense if the code is perfect
Thanks to all.