Hi all
I have created a server and client app using remoting. When an event is fired in the server - the client needs to pick it up. When trying to create the event handler in the client, I get the following error:
Cannot find the assembly Blah, Version=1.0.1521.20819, Culture=neutral, PublicKeyToken=null.
This is the code I am using to create the client object and its event handler:
If I take out the line
the rest runs fine.
Does anyone know what I'm doing wrong that is causing this? I'm using the .NET Framework 1.1 for this.
Let me know if anything is unclear or if you want me to post anything else to clarify this.
Thanks as always
Craftor
I have created a server and client app using remoting. When an event is fired in the server - the client needs to pick it up. When trying to create the event handler in the client, I get the following error:
Cannot find the assembly Blah, Version=1.0.1521.20819, Culture=neutral, PublicKeyToken=null.
This is the code I am using to create the client object and its event handler:
Code:
try
{
SpectatorServer obj = (SpectatorServer)
Activator.GetObject(typeof(Spectator.SpectatorServer),
"tcp://localhost:" + GetPort() +"/WatchObject");
if (obj == null) return "Could not find server...";
else
{
obj.ValueChangedEvent += new
SpectatorServer.eventHandler
(this.Watcher_ValueChangedEvent);
return(obj.GetLatest());
}
}
catch (Exception e)
{
textBox1.Text += e.Message;
MessageBox.Show(e.StackTrace);
return "";
}
If I take out the line
Code:
obj.ValueChangedEvent+= new SpectatorServer.eventHandler(this.Watcher_ValueChangedEvent);
the rest runs fine.
Does anyone know what I'm doing wrong that is causing this? I'm using the .NET Framework 1.1 for this.
Let me know if anything is unclear or if you want me to post anything else to clarify this.
Thanks as always
Craftor