Issue with my First Remoting app -
11-23-2007
, 08:27 AM
I am new in remoting and I am trying to create the sample explained in MSDN.
I have created 3 projects:
1) RemotePrint which return a single string
2) Hote that is the Listener
3) Client which will instanciate a class from RemotePrint
I have a problem with the client because I can not instanciate the remote class.
Here is the RemotePrint code:
**************************************Public Class RemotePrintInherits MarshalByRefObject Private maChaine As String = "Retour depuis l'objet remote"Public Shared Sub main()End SubPublic Function lireChaine() As String Return maChaineEnd FunctionEnd Class***************************************The Hote (listener) code:
**************************************Imports System.Runtime.RemotingPublic Class Hote Public Shared Sub main() RemotingConfiguration.Configure("Hote.exe.config", False) Console.WriteLine("En écoute. Tapez Entrée pour stopper...") Console.ReadLine() End SubEnd Classwith the config file
<system.runtime.remoting> <application> <sevice> <wellknown mode="Singleton" type="RemotePrint, RemotePrint" objectUri="RemotePrint.rem" /> </sevice> </application></system.runtime.remoting>************************** *and the client code
*****************************************Imports SystemImports System.Runtime.RemotingModule Client Public Sub Main() RemotingConfiguration.Configure("Client.exe.config ", False) Dim remoteObject As New remotePrint ' I get an error, remotePrint is not declared End Sub End Moduleand Intellisync doesn't shows it up. Any help would be appreciated.
Thanks a lot
Jean-Claude |