随笔分类 -  WCF

[转载]WCF序列化65536大小限制的问题
摘要:错误:The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:GetResult. The InnerException message was 'Maximum number of items that can be serialized or deserialized in an object graph is '65536' 阅读全文

posted @ 2014-02-25 17:18 iackjee 阅读(678) 评论(0) 推荐(0)

WCF已超过传入消息(65536)的最大消息大小配额的解决方法
摘要:在服务端和客户端的配置文件中添加修改节点 maxReceivedMessageSize="1000000000";或者通过编程设置bind.MaxReceivedMessageSize = 1000000000;//设置传输的最大值 阅读全文

posted @ 2014-02-24 00:31 iackjee 阅读(416) 评论(0) 推荐(0)

WCF获取客户端IP和端口
摘要://提供方法执行的上下文环境 OperationContext context = OperationContext.Current; //获取传进的消息属性 MessageProperties properties = context.IncomingMessageProperties; //获取消息发送的远程终结点IP和端口 RemoteEndpointMessageProperty endpoint = properties[RemoteEndpointMessag... 阅读全文

posted @ 2014-02-23 23:18 iackjee 阅读(1185) 评论(0) 推荐(0)

[转载]WCF 几种常见错误
摘要:WCF标准的配置文件为: 遇到问题:1.“服务XXXXX有零个应用程序(非基础结构)终结点”。 这是因为的name属性没有对应到正确的名称。在上面的例子中使用的是Microsoft.ServiceModel.Samples命名空间下的CalculatorService类,如果命名空间命或类名写错,或者写的不完全(比如只写了命名空间名字或者类名),则会出现上述错误。2.WCF服务发布以后,Client 端无法引用WCF服务,查看错误为“application soap+xml charset utf-8 客户端和服务绑定可能不匹配”。或者使用IE... 阅读全文

posted @ 2014-02-22 21:08 iackjee 阅读(637) 评论(0) 推荐(0)

WCF 服务器已拒绝客户端凭据
摘要:将 WCF 服务器和客户端分别部署到不同机器上,可能会触发如下异常。未处理 System.ServiceModel.Security.SecurityNegotiationException Message="服务器已拒绝客户端凭据。" Source="mscorlib"解决方法,就是调整服务器端 Binding 的安全方式,比如设为 "None"。NetTcpBinding binding = new NetTcpBinding(); binding.Security.Mode = SecurityMode.None;Service 阅读全文

posted @ 2014-02-22 21:02 iackjee 阅读(2541) 评论(0) 推荐(0)

[转载]WCF4.0进阶系列--第四章 保护企业内部的WCF服务
摘要:http://www.cnblogs.com/yang_sy/archive/2011/05/24/2054834.html 阅读全文

posted @ 2014-02-22 19:34 iackjee 阅读(167) 评论(0) 推荐(0)

导航