![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||||
| |||||
|
|
Grant, The object you expose through remoting is an object, nothing more, nothing less. To that end, you can expose properties, methods, fields, etc, etc, that will allow it to access the server, assuming that your object has a reference to it. |
|
So how does your object get access to the server? This is the same as asking how a form has access to another form. You set a reference through a method, the constructor, a field, or a property. |
|
The only consideration here is that if you expose a property with your service object through remoting, is it going to be marshaled by value, or by reference? Something tells me you will want it to be marshaled by reference, in which case you will want to derive your server class from MarshalByRefObject. |
|
Not seeing your service object design, I can't tell if it is a good idea to expose the whole object. You might be exposing things you don't want to. |
|
Hope this helps. -- - Nicholas Paldino [.NET/C# MVP] - mvp (AT) spam (DOT) guard.caspershouse.com "Grant Schenck" <schenckg (AT) optonline (DOT) net> wrote in message news:Oj6Ar5y1GHA.4484 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Hello, I have a Windows Service developed in C# .NET. I'm making it a remote server and I can, via an IPC Channel, expose methods and call them from a client. However, I now want my remoted object to be able to invoke a method on my server object and given that the object is built in a C# Class DLL shared between the client and server I'm not sure how to get access to the server object from the remoted object. So, what techniques are commonly used to allow this? Thanks, -- Grant Schenck |
#3
| |||
| |||
|
|
Hello, I have a Windows Service developed in C# .NET. I'm making it a remote server and I can, via an IPC Channel, expose methods on an object and call them from a client. However, I now want my remoted object to be able to invoke a method on my server object and given that the object is built in a C# Class DLL shared between the client and server I'm not sure how to get access to the server object from the remoted object. So, what techniques are commonly used to allow this? Thanks, |
#4
| |||
| |||
|
|
However, I now want my remoted object to be able to invoke a method on my server object and given that the object is built in a C# Class DLL shared between the client and server I'm not sure how to get access to the server object from the remoted object. |
#5
| |||
| |||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |