Harris

Harris

  • NA
  • 4
  • 0

Remoting Interfaces

Oct 10 2009 8:31 AM
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)