1
Answer

Remoting Interfaces

Photo of Harris

Harris

15y
2.1k
1
Hello guys,

I am having this trouble with remoting using interfaces. So, what I want to achieve is that the client side doesn't know anything about the remotable object but only the interfaces class (which is also implemented by the remotable object) while the server side loads the assembly using either Assembly.LoadFrom, Assembly.LoadFile or GAC. The server side will then still host the type of the real remotable object (downloaded from the assembly) but then the client will retrieve the remotable object, by using Activator.CreateInstance or Activator.GetObject and cast it into the interface type. The problem I'm getting is that when I'm using either Assembly.LoadFrom or Assembly.LoadFile, I can't call the method inside the remotable object, even if I have defined it inside the interface. The program, in fact, throws the FileNotFoundException. On the other hand, when I use GAC, I can't even get the Type from the assembly. Hope to hear from you guys real soon.

Thanks in advance.

Answers (1)

0
Photo of Bechir Bejaoui
NA 20.1k 5.3m 16y
I see
0
Photo of Marco Blandon
NA 12 0 16y
Thank you for the reply. Problem was the Convert.ToString(textBox1) I need to add textBox1.Text.
0
Photo of Bechir Bejaoui
NA 20.1k 5.3m 16y

To open any exe you can write this single line of code

System.Diagnostic.Process.Start(@"....your path here....");