这是Framework1.1新加入的安全特性,限制可以自动Deserialize的类型。一种解决办法是在配置文件中,设置typeFilterLevel="Full"。另一种是在程序中设定对应的属性:
BinaryServerFormatterSinkProvider serverProv = new BinaryServerFormatterSinkProvider();
provider.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;BinaryClientFormatterSinkProvider clientProv = new BinaryClientFormatterSinkProvider();IDictionary props = new Hashtable();
props["port"] = 1234;HttpChannel chan = new HttpChannel(props, clientProv, provider);
ChannelServices.RegisterChannel( chan );
BinaryServerFormatterSinkProvider serverProv = new BinaryServerFormatterSinkProvider();
provider.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;BinaryClientFormatterSinkProvider clientProv = new BinaryClientFormatterSinkProvider();IDictionary props = new Hashtable();
props["port"] = 1234;HttpChannel chan = new HttpChannel(props, clientProv, provider);
ChannelServices.RegisterChannel( chan );
解决方案 »
- 两个控件的属性关联--事件监听or数据绑定哪个好
- 操作foxpro数据库
- 1,2....14位数中随机取出9个数,第一个要比第二个数小,如何写
- datagridview中的数据很多,加载完数据后 滚动条 自动到最下边,如何做呀?
- 怎样dataGridView绑定代码生成的datatable
- 急啊!兄弟们!BS网页在服务器端创建一个代$符号的共享文件夹!
- 求助,一个纠结了我很久的问题~~~
- 100分求解webservice的参数传递问题
- 求助关于线程执行循序问题
- vb翻写成C#,简单!!!!
- 请指教:类似于表结构设计器中某字段(行)可以上下移动的设计的问题。在线
- 高手进来,Excel到xml格式转换的问题。
改一个客户端和服务断的配置文件,参考:
http://www.ingorammer.com/remotingFAQ/changes2003.html