Take a look at this sample code:
http://www.bearcanyon.com/dotnet/#RemoteEvents As you've noted, in order for your client to subscribe to the events, the
class that defines the events must be in a shared assembly used by both the
client and the windows service. Generally every remoting project will have
at least three assemblies:
1) The client application/assembly.
2) The server application/assembly.
3) The shared remoting interfaces/classes assembly.
The shared assembly will generally contain:
1) The definitions of any serializable classes used by both client and
server.
2) Either the class definitions or simply interface definitions for your
MarshalByRefObject-derived classes. (Remote events would always be defined
on a MBR class, so they would be in here also).
The sample code should help you out. If you run into any snags, post back.
Good luck -
Ken
[quoted text, click to view] "Trevor Braun" <tbraun_nospam4me@codetrue.com> wrote in message
news:u9q9d627EHA.3828@TK2MSFTNGP09.phx.gbl...
>I have a Windows service that uses a timer and checks an ODBC datasource
>for new sales order every few seconds. When the new sales order is found,
>I'd like to notify a client application that the new sales order was
>detected. I thought this was going to be fairly simple, but I can't get it
>to work. I've tried several solutions using remoting, and examples from
>different web sites, but I can't seem to get any of it working because the
>events are being sent from one application to another. In VS.NET, I can't
>even reference the windows service events, because they're part of an exe,
>not an assembly.
>
> Any help would be very much appreciated, however, I'm new to remoting, and
> I have just a minor understanding of the sinks, channels, etc, so if you
> could give me details or somewhere that I can find a good example of
> exactly what I'm trying to do, I would be very, very grateful.
>
> Thanks,
> Trevor Braun
>
>
>