Thanks for the speedy response.
Apologies, but I'm not certain that I understand your reply.
My web service contains an object that exists for the lifetime of the
web service. This object monitors the files and folders.
I would like it such that my remote objects (singleton or singlecall)
can access this object. This may or may not be possible.
James
In your first post, you said "Windows Service" and in the last, "WebService".
Which is it? If your service exposes a TCP Channel remoting server, then all
clients would need to do is connect to it as a Remoting client. They can use
a remotable class as a communication proxy provided it derives from
MarshalByRefObject.
Peter

Signature
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
> Thanks for the speedy response.
>
[quoted text clipped - 7 lines]
>
> James
Webmills - 29 Aug 2006 17:15 GMT
Apologies for the error. In fact I am connecting to the Windows Service
from a Web Service, hence my mistake. It should have read Windows
Service. And it's been a long day :-)
I have now attacked this as below....
1) I have created an object inherited from MarshalByRefObject.
2) I have overridden its InitializeLifetimeService method to return
null.
3) In the On Start method of my Windows Service I have registered this
as a remote object using the RemotingServices.Marshal method.
I am hoping that I will now be able to access this from my web service
or external client. I am also hoping that it will persist for the
duration of the service.
Am I correct in this? Are there any major pitfalls of which I should be
aware.
Thanks for your advice.
Peter Bromberg [C# MVP] - 30 Aug 2006 19:27 GMT
Sounds like you have got it right to me. As long as your object has the
required methods, you should be able to call them from the client that
references this object which has been instantiated via remoting configuration.
I don't know of any major pitfalls.
Peter

Signature
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
> Apologies for the error. In fact I am connecting to the Windows Service
> from a Web Service, hence my mistake. It should have read Windows
[quoted text clipped - 16 lines]
>
> Thanks for your advice.