hi ....remoting stuff: Server configuration:
SoapServerFormatterSinkProvider provider = new SoapServerFormatterSinkProvider(); provider.TypeFilterLevel = TypeFilterLevel.Full; IDictionary props = new Hashtable(); props["port"] = 4000; HttpChannel httpchannel = new HttpChannel(props, null, provider); ChannelServices.RegisterChannel(httpchannel, false); WellKnownServiceTypeEntry entry = new WellKnownServiceTypeEntry(typeof (MyTcpChannel), "SomeUri", WellKnownObjectMode.Singleton); RemotingConfiguration.ApplicationName = "MyTcpChannel"; RemotingConfiguration.RegisterWellKnownServiceType(entry); //create objectRef on instanceTransport System.Runtime.Remoting.RemotingServices.Marshal (instanceTransport, "SomeUri"); Client configuration: string url = @"http://localhost:4000/MyTcpChannel/SomeUri"; SoapServerFormatterSinkProvider provider = new SoapServerFormatterSinkProvider(); provider.TypeFilterLevel = TypeFilterLevel.Full; IDictionary props = new Hashtable(); props["port"] = 0; ChannelServices.RegisterChannel(new TcpChannel(props, null, provider), false); MyTcpChannel transport = (MyTcpChannel)Activator.GetObject(typeof (MyTcpChannel), url); MyTcpChannel has a method that takes a MemoryStream as an arg. void Send(MemoryStream stm); When the server process this memorystream it throws an exception: "An error occurred while processing the request on the server: System.ArgumentNullException: No message was deserialized prior to calling the DispatchChannelSink. " If I change the method to: void Send(byte[] stm); No exception is thrown.. MemoryStream is serializable, so I don't get it... Can anybody help out here... Somehow I think this is related to the configuration...note I have no config files, doing this at runtime. Any suggestions here ? Regards Allan =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
