您的位置:首页 > 其它

a break in .net 2.0 remoting

2006-02-23 19:29 330 查看
Currently, we are converting our application to .net 2.0. Then I am getting an error with remoting... simply because Soap Serializer does not support serializing Generic Types...
and here is ms answer: "
That is correct. We have decided not to invest in any significant new feature work for the SoapFormatter in Whidbey."

So what I have to do is changing our soap serializer formatter to binary serializer formatter using a config like this,
BinaryServerFormatterSinkProvider serverProv = new BinaryServerFormatterSinkProvider();
BinaryClientFormatterSinkProvider clientProv = new BinaryClientFormatterSinkProvider();

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

IDictionary props = new Hashtable();
props["port"] = 0;
props["TypeFilterLevel"] = "Full";

HttpChannel chan = new HttpChannel(props, clientProv, serverProv);
ChannelServices.RegisterChannel( chan );

But it is only part of the solution.. Unfortunately, I am using event call back, so it is working for client to submit the generic list data to serve. And when the server try to publish the data change to other subscribed event. "I am still getting a soapformatter not support error"

The original post in msdn forum with more codes are here

It seems no answer yet.. :(

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: