Well, first of all, I've been looking at the internet for over 2 hours now but I couldn't really find any useful answer to my problem. Well, its quite simple: I have a Client-Server program which I need to list the files in a server using Remoting and Form (I know about WCF, but that's not the point here). Well, I have all the listing directory/folders working ok (testing without Remoting, in my own PC), but when I tried to "Remote" this, I'm having a hard time.
First of all: I'm using http as channel and the registering and activation is all right. At least I guess, as I'm using:
RemotingServices.Marshal(Server,"ListaArquivos")
in the server and
server = (Server)Activator.GetObject(typeof(ServerDLL.Server), "http://localhost:12345/ListaArquivos")
in the client, where Server is the .dll (MarshalByRefObject).
My steps are:
- I have the .dll class (inherits MarshalByRefObject) which holds all the methods that I call in the client-to-server steps. 1 of this methods returns a TreeNodeCollection and...
- In the client Form, I call this method and I try to insert this Collection into the Form, but that's when I get the "Windows.Form.TreeNodeCollection" blabla "not serializable".
And that's my doubt, how can I make this work ? P.S-> My project link: My Explorer