Remoting Activation and Services...?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Merrion

    Remoting Activation and Services...?

    OK - I have a service that runs on a remote machine to monitor certain
    file movements using the FileSystemWatch er class.
    The service has an internal collection of the filename, time created
    (if at all) and time file movced(if at all).

    There is a class that holds these details thus:-

    --------------------------------------------------------------------------
    Public Class FileMovement

    Public Filename As String

    Public TimeCreated As DateTime

    Public TimeMoved As DateTime

    End Class
    ---------------------------------------------------------------------------

    The service registers its ability to create these FileMovement things
    thus:-

    '--8< ----------------------------------
    Dim Channel As New System.Runtime. Remoting.Chanel s.HttpChannel(1 912)
    ChannelServices .RegisterChanne l(Channel)

    RemotingConfigu ration.Applicat ionName = "LogWatcher "
    RemotingConfigu ration.Register ActivatedServic eType( GetType(
    FileMovement))
    '--8<------------------------------------


    Then the client app (which can be working on another machine) gets to
    make a "FileMoveme nt" thus:-

    --------------------------------------------------------------
    Dim foo As FileMovement = CType( Activator.GetOb ject(Type.GetTy pe(
    "Filemoveme nt, object") , "http://" & _Servername &
    ":1912/LogWatcherServi ce"), FileMovement)
    -------------------------------------------------------------------


    So - how do I do the last step ... get the LogWatcherServi ce object to
    create and return a FileMovement class?
Working...