The problem is that both <clientProviders> and <serverProviders> should
appear underneath <channel> and not <channels> as is the case in the config
file.
"JBO" wrote:
> I'm receiving an error message when trying to set a context control object in
> a remotely activated object. For error messages and config files see below.
> I'm running MS .NETframework 1.1
> Any help with this problem is very much appreciated.
> -----------
> Error message:
>
> An unhandled exception of type
> 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll
>
> Additional information: Because of security restrictions, the type
> System.Runtime.Remoting.ObjRef cannot be accessed
> -----------
> The server side config file contains:
>
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
> <system.runtime.remoting>
> <application>
> <channels>
> <channel ref="tcp" port="49999" />
> <clientProviders>
> <formatter ref="binary" />
> </clientProviders>
> <serverProviders>
> <formatter ref="binary" typeFilterLevel="Full" />
> </serverProviders>
> </channels>
> <service>
> <activated type="BL.TMInfo, BL" />
> </service>
> </application>
> </system.runtime.remoting>
> </configuration>
> -----------
> The client side config file contains:
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
> <system.runtime.remoting>
> <application>
> <client url="tcp://localhost:49999">
> <activated type="BL.TMInfo, BL" />
> </client>
> <channels>
> <channel ref="tcp" port="0" />
> <clientProviders>
> <formatter ref="binary" />
> </clientProviders>
> <serverProviders>
> <formatter ref="binary" typeFilterLevel="Full" />
> </serverProviders>
> </channels>
> </application>
> </system.runtime.remoting>
> </configuration>
>
> -----------
> Server stack trace:
> at
> System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type type)
> at
> System.Runtime.Serialization.Formatters.Binary.ObjectReader.ParseObject(ParseRecord pr)
> at
> System.Runtime.Serialization.Formatters.Binary.ObjectReader.Parse(ParseRecord
> pr)
> at
> System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
> at
> System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum)
> at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
> at
> System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler
> handler, __BinaryParser serParser, Boolean fCheck, IMethodCallMessage
> methodCallMessage)
> at
> System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream
> serializationStream, HeaderHandler handler, Boolean fCheck,
> IMethodCallMessage methodCallMessage)
> at
> System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRequestMessage(String
> objectUri, Stream inputStream, Boolean bStrictBinding, TypeFilterLevel
> securityLevel)
> at
> System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack
> sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream
> requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders,
> Stream& responseStream)