.NET remoting and Simple Client / Server application design help...
-
I've been dabbling with .NET remoting in the past few days and I'm completely new to it. I've successfully created a client application that accesses a marshaled object by a server application and updates it, therefore reflecting the change on the server side. So, I've been thinking about going bigger with my dabblings.. I'd like to create a simple application where a user can create an order of something, say hamburgers. When the user selects the # of hamburgers and enters their name, they can press a button to send the order. I want the server side to receive the order and store it in xml. So, I've been thinking about this and applying what I know of C# and .NET remoting. What's the best way to get an order to the server without using large objects? Should I create a simple remotable object with an Add and Delete method that accepts an order? Then, should I create delegates in that class for Add and Delete so that my server application can listen for the Add and Delete delgates? Should I have a constructor for my remotable object that accepts a reference to my server's forms, methods, etc and forget about delegates? Please remember that I'm fairly new to this... help is appreciated..
-
I've been dabbling with .NET remoting in the past few days and I'm completely new to it. I've successfully created a client application that accesses a marshaled object by a server application and updates it, therefore reflecting the change on the server side. So, I've been thinking about going bigger with my dabblings.. I'd like to create a simple application where a user can create an order of something, say hamburgers. When the user selects the # of hamburgers and enters their name, they can press a button to send the order. I want the server side to receive the order and store it in xml. So, I've been thinking about this and applying what I know of C# and .NET remoting. What's the best way to get an order to the server without using large objects? Should I create a simple remotable object with an Add and Delete method that accepts an order? Then, should I create delegates in that class for Add and Delete so that my server application can listen for the Add and Delete delgates? Should I have a constructor for my remotable object that accepts a reference to my server's forms, methods, etc and forget about delegates? Please remember that I'm fairly new to this... help is appreciated..
This morning I created a simple remotable object with a delegate and event using that delgate. On the server side where I created the object, I setup an eventhandler for the event I created and marshaled the object. On the client side when I get a reference to the object using Activator.GetObject and I try creating an eventHandler for the same event, I get a security policy error. I was hoping that setting up an eventhandler on the object on both server and client sides that it would be a way that I could communicate back and forth between the server and client. I know that this is probably a misguided attempt at client/server and server/client communication, but I'm new to this. Can anyone point me in the right direction?