B发生特定事件,在事件中连接到A,然后把代表此事件状态的对象传递给A,A接收到对象判断对象所代表的事件状态作出对应的反应
解决方案 »
- socket server 用telnet调试正常,用工具不行
- 寻求大神帮忙~咨询一些关于编程的事情~小弟真心拜谢
- 为什么DropDownList在“编辑DataBindings”时不能选择字段绑定而只能自定义绑定
- xml删除节点问题,还没有人解决!!没高手??马上送分!!
- 求一个正则表达式
- 请教VB引用C#组件的问题
- 实际应用中一个.NET remoting的问题
- C# 通过webbrouser 打开ppt,如何在C#程序中对该ppt添加新的页?
- 请教GetType的用法:为何Type t1=Type.GetType("ClassLibrary1.Class1");不能执行?
- DataGrid的Bug问题(WinForm)
- C#连接数据库的问题
- 怎樣查服務器中系統進程占用情況
// 有关的技术细节,请见 MSDN 帮助文档中相应的条目。
provider.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;BinaryClientFormatterSinkProvider clientProv = new BinaryClientFormatterSinkProvider();IDictionary props = new Hashtable();
props["port"] = XXXX;HttpChannel chan = new HttpChannel(props, clientProv, provider);
ChannelServices.RegisterChannel( chan );
好像还是不行啊怎么还是一样的错误啊
使用应用程序配置文件设置反序列化级别
若要使用配置文件设置反序列化级别,必须显式指定 <formatter> 元素的 typeFilterLevel 属性。虽然这通常是在服务器端指定的,但您还必须为注册来侦听回调的客户端上的任何信道指定这一属性,以控制其反序列化级别。以下示例为应用程序域中的 SoapFormatter 和 BinaryFormatter 显式地将反序列化级别设置为 Low。重点警告:
千万不要在 Machine.config 这个文件中进行 Full 配置,因为这么做太不安全了。<configuration><system.runtime.remoting><application><service><wellknown type="ServiceType, common" objectUri="ServiceType.soap" mode="Singleton" /></service><channels><channel ref="http"><serverProviders> <provider ref="wsdl" /><formatter ref="soap" typeFilterLevel="Low" /> // Full<formatter ref="binary" typeFilterLevel="Low" /> // Full</serverProviders></channel></channels></application></configuration>另外,在程序集中声明以下特性,也是有用的,具体应用场合和技巧请见 MSDN 帮助文档的相关条目。
[assembly:AllowPartiallyTrustedCallers]