Getting an exception when trying to set up a callback in remoting

G

Guest

What does this exception message mean?

Type System.DelegateSerializationHolder and the types derived from it (such
as System.DelegateSerializationHolder) are not permitted to be deserialized
at this security level.

This is being done after a connection has been made to a remote object and
I'm trying to setup a callback to the client.

TIA - Jeff.
 
G

Guest

Stoitcho,
Either I'm missing something or the code isn't complete. There are a couple
of things it's looking for that can't be found. There's a class called
SubscriberInfo that it can't find the constructor for with 3 elements. I
also had to create a reference to it.

Am I missing something or
 
S

Stoitcho Goutsev \(100\)

Jeff,

SubscriberInfo is a class form the original poster project
What you need is the info form my first message in the thread. I didn't want
to repost it, but here it is

"Since .NET v1.1 Microsoft demand more security restrictions on remoting
serialization. As a result in .NET v1.0 it is was possible to create a
channel as
ChannelServices.RegisterChannel(new TcpChannel(XXX));
However, with v1.1 we need to do more work to relax those restrictions and
make handling events possible.

On the server site you relax those restrictions as follows


BinaryClientFormatterSinkProvider clientProvider = null;
BinaryServerFormatterSinkProvider serverProvider =
new BinaryServerFormatterSinkProvider();


serverProvider.TypeFilterLevel =
System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;


IDictionary props = new Hashtable();
props["port"] = 4000;
props["typeFilterLevel"] = TypeFilterLevel.Full;
TcpChannel chan = new TcpChannel(props,clientProvider,serverProvider);


ChannelServices.RegisterChannel(chan);


On the client site


BinaryClientFormatterSinkProvider clientProvider = new
BinaryClientFormatterSinkProvider();
BinaryServerFormatterSinkProvider serverProvider = new
BinaryServerFormatterSinkProvider();
serverProvider.TypeFilterLevel =
System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;


IDictionary props = new Hashtable();
props["port"] = 0;
props["typeFilterLevel"] = TypeFilterLevel.Full;
TcpChannel chan = new TcpChannel(
props,clientProvider,serverProvider);


ChannelServices.RegisterChannel(chan); "
 
G

Guest

Thanks for the help. I'll give it a try.

Jeff.

Stoitcho Goutsev (100) said:
Jeff,

SubscriberInfo is a class form the original poster project
What you need is the info form my first message in the thread. I didn't want
to repost it, but here it is

"Since .NET v1.1 Microsoft demand more security restrictions on remoting
serialization. As a result in .NET v1.0 it is was possible to create a
channel as
ChannelServices.RegisterChannel(new TcpChannel(XXX));
However, with v1.1 we need to do more work to relax those restrictions and
make handling events possible.

On the server site you relax those restrictions as follows


BinaryClientFormatterSinkProvider clientProvider = null;
BinaryServerFormatterSinkProvider serverProvider =
new BinaryServerFormatterSinkProvider();


serverProvider.TypeFilterLevel =
System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;


IDictionary props = new Hashtable();
props["port"] = 4000;
props["typeFilterLevel"] = TypeFilterLevel.Full;
TcpChannel chan = new TcpChannel(props,clientProvider,serverProvider);


ChannelServices.RegisterChannel(chan);


On the client site


BinaryClientFormatterSinkProvider clientProvider = new
BinaryClientFormatterSinkProvider();
BinaryServerFormatterSinkProvider serverProvider = new
BinaryServerFormatterSinkProvider();
serverProvider.TypeFilterLevel =
System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;


IDictionary props = new Hashtable();
props["port"] = 0;
props["typeFilterLevel"] = TypeFilterLevel.Full;
TcpChannel chan = new TcpChannel(
props,clientProvider,serverProvider);


ChannelServices.RegisterChannel(chan); "




--

Stoitcho Goutsev (100)

WinDev said:
Stoitcho,
Either I'm missing something or the code isn't complete. There are a
couple
of things it's looking for that can't be found. There's a class called
SubscriberInfo that it can't find the constructor for with 3 elements. I
also had to create a reference to it.

Am I missing something or
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top