AndyDale
Member
Hi All,
I’m having a problem creating a Server Application (in VB.NET) which can be early bound to by two Client Applications and exchange data between them via the Server Application.
Scenario
There are three applications ClientApp1, ClientApp2 & ServerApp all residing on the same server/workstation.
I’ve chosen this approach as ClientApp3 to ClientAppn can be added and removed at any time.
The ClientApps are both manually started and both early bind to the ServerApp.
ClientApp1 sends a message to ClientApp2 via the ServerApp.
ClientApp2 replies to ClientApp1 via the ServerApp.
Do you know how I can create a ServerApp in VB.NET to achieve this?
Every time I create a ServerApp.DLL with a Connect Class in VB.NET the two ClientApps see two different instances of the data in the class. I’ve even created a module with global data read by the Get property but still does not contain the data sent to it by the first ClientApp.
How do I stop multiple instances of the ServerApp being created?
ServerApp.dll
Module modServerApp
Public gstrAppConnect As String = "AppConnect"
End Module
Public Class clsServerApp
Public Property AppConnect() As String
Get
Return gstrAppConnect
End Get
Set(ByVal value As String)
gstrAppConnect = value
End Set
End Property
End Class
ClientApp.exe
Imports ServerApp.clsServerApp
Public Class frmClientApp
Private objServerApp As New ServerApp.clsServerApp
Private Sub btnRead_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRead.Click
TextBox1.Text = objServerApp.AppConnect
End Sub
Private Sub btnWrite_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWrite.Click
objServerApp.AppConnect = TextBox1.Text
End Sub
End Class
Regards
I’m having a problem creating a Server Application (in VB.NET) which can be early bound to by two Client Applications and exchange data between them via the Server Application.
Scenario
There are three applications ClientApp1, ClientApp2 & ServerApp all residing on the same server/workstation.
I’ve chosen this approach as ClientApp3 to ClientAppn can be added and removed at any time.
The ClientApps are both manually started and both early bind to the ServerApp.
ClientApp1 sends a message to ClientApp2 via the ServerApp.
ClientApp2 replies to ClientApp1 via the ServerApp.
Do you know how I can create a ServerApp in VB.NET to achieve this?
Every time I create a ServerApp.DLL with a Connect Class in VB.NET the two ClientApps see two different instances of the data in the class. I’ve even created a module with global data read by the Get property but still does not contain the data sent to it by the first ClientApp.
How do I stop multiple instances of the ServerApp being created?
ServerApp.dll
Module modServerApp
Public gstrAppConnect As String = "AppConnect"
End Module
Public Class clsServerApp
Public Property AppConnect() As String
Get
Return gstrAppConnect
End Get
Set(ByVal value As String)
gstrAppConnect = value
End Set
End Property
End Class
ClientApp.exe
Imports ServerApp.clsServerApp
Public Class frmClientApp
Private objServerApp As New ServerApp.clsServerApp
Private Sub btnRead_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRead.Click
TextBox1.Text = objServerApp.AppConnect
End Sub
Private Sub btnWrite_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWrite.Click
objServerApp.AppConnect = TextBox1.Text
End Sub
End Class
Regards