我用remoting 做远程监控
服务端代码如下:
Private Sub starts_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles starts.Click
Me.msg.Text = "远程监控服务已经启动..."
Me.starts.Enabled = False
Me.stops.Enabled = True
Dim port As Integer = CInt(Me.port.Text.Trim)
Dim channel As New TcpServerChannel(port)
ChannelServices.RegisterChannel(channel, False)
Monitor = New MonitorDLL.Monitor
RemotingServices.Marshal(Monitor, "MonitorServerUrl2")
End Sub
如果是基于以上服务端建里一个客户端实例已经实现远程监控电脑。
但现在问题是, 我在同一个WINFORM中调用实例化两个客户端,只能成功一个,为什么?大侠们出招!谢谢