Hi,
I just started to write a .net remoting application, but unfortunately,
there are some things I just don't understand/need to ask:
- When I try to register my (tcp) channel on a port that is already in use,
an exception is thrown...how can I react best on this (though rare)
circumstances? What would you suggest?
- When I use the following code, an exception is thrown:
Server:
Dim channel As New TcpServerChannel("MyTest", 3445)
ChannelServices.RegisterChannel(channel, True)
RemotingConfiguration.RegisterWellKnownServiceType (GetType(MyRemoteClass),
"MyTest", WellKnownObjectMode.SingleCall)
Client:
Dim channel As New TcpClientChannel
ChannelServices.RegisterChannel(channel, True)
RemotingConfiguration.RegisterWellKnownClientType( GetType(WindowsApplication1.MyRemoteClass), "tcp://localhost:3445/MyTest")
Dim x As New WindowsApplication1.MyRemoteClass
MsgBox(x.GetLocation())
remote class:
Public Class MyRemoteClass
Inherits MarshalByRefObject
Public Function GetLocation() As String
Return My.Application.Info.AssemblyName
End Function
End Class
The exception that is thrown is the following:
The Undo operation encountered a context that is different from what was
applied in the corresponding Set operation. The possible cause is that a
context was Set on the thread and not reverted(undone).
Any idea what this means?
Best wishes and thanks a lot,
Peter