Hi!
I'm kind of new in Remoting domain, and I'm facing some problem,
I've create a DLL that store a Class that 2 application need,
One of them say program "A" register and instantiate the "service" like this
In the second program say, Program "B", I simply instantiate the class SyncControler to the already registered oneCode:RemoteTcpSetting("port") = pServicePortNumber RemoteTcpSetting("name") = pServiceName Dim channel As New System.Runtime.Remoting.Channels.Http.HttpChannel(RemoteTcpSetting, Nothing, Nothing) If ChannelServices.GetChannel(pServiceName) Is Nothing Then ChannelServices.RegisterChannel(channel, False) End If RemotingConfiguration.RegisterWellKnownServiceType(GetType(MMOutlookSyncServer.clsSyncControler), pServiceName, WellKnownObjectMode.Singleton) 'Instantiate the service oSyncControler = CType(Activator.GetObject(GetType(MMOutlookSyncServer.clsSyncControler), "http://127.0.0.1:" & pServicePortNumber.ToString & "/" & pServiceName), MMOutlookSyncServer.clsSyncControler)
All the above work great I can manipulate the oSyncControler member and property perfectly.Code:oSyncControler = CType(Activator.GetObject(GetType(MMOutlookSyncServer.clsSyncControler), "http://127.0.0.1:" & pServicePortNumber.ToString & "/" & pServiceName), MMOutlookSyncServer.clsSyncControler)
Thing go a bit more problematic, when I bring the code from the program "B" into a Outlook AddIns DLL. Every procedure/method that I call bring error.
One of them, when I try to get a Typed DataSet from the "service"
give me this error:Code:Me.DataGridView1.DataSource = oSyncControler.SyncLog
A another method that I've tryCode:Parse Error, no assembly associated with Xml key a2:http://schemas.microsoft.com/clr/nsassem/MMOutlookSyncServer/MMOutlookSyncServer%2C%20Version%3D8.3.104.3%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3De6d769c29d13d867 dsSyncLog
give me this error:Code:oSyncControler.WriteSyncHeader("Remoting sync controler started on TCP port :" & pServicePortNumber.ToString, MMOutlookSyncServer.clsSyncControler.eSyncResult.Message)
I've read a bit about this problem and it seam that is something to do with Type version or something, and it suggest to do Manual Serialization, or manual type conversion. But I'm note sure if this is really needed, since all file are Local to the computer, and all type should be Known.Code:Invalid method signature 'xsd:string a2:clsSyncControler+eSyncResult'.
Hope to be clear enough
Hugo
PS I'm using VS 2005, Fw 2.0


Reply With Quote
2008, 2009

Bookmarks