I'm prototyping a C#/.NET client/server environment in which I need to return an object instance (already constructed with data the client needs- avoiding the exposure of server-side (read: internal database details) that the calling code needs to perform "remote" method calls on said instance.
When the client code calls methods on this object, they should run in the context of the Host process.
Would using .NET remoting, WCF, or..? be appropriate for this task? And more importantly, can anybody provide an example of this or point me to any relevant articles regarding how this is done?
Interface Example (WCF decorations included):
[ServiceContract(SessionMode = SessionMode.Required)]
public interface IGroupContract
{
[OperationContract]
GroupInfo BoundToGroup();
[OperationContract]
Group GetEntryInfo();
[OperationContract]
Boolean RebindGroup(GroupInfo NewGroup);
}
[ServiceContract]
public interface IClientDatabase {
{
[OperationContract]
System.String[] FetchClsidList();
[OperationContract]
IGroupContract Create(System.String Name, System.String Group);
[OperationContract]
System.Boolean Delete(IGroupContract Grp);
}