返回的MembershipUser使用WCF服务 [英] Return MembershipUser using WCF service

查看:108
本文介绍了返回的MembershipUser使用WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有WCF服务来获取用户的ActiveDirectory中。 我收到的请求(用户名)的参数并建立与响应性的MembershipUser。 从某些原因,连接亲近。 服务操作找到用户,并成功创建了响应。 执行行时:返回响应;我得到了在客户端异常。 异常:基础连接已经关闭:连接被意外关闭 内部异常: 响应=空 状态= System.Net.WebExceptionStatus.ConnectionClosed

I have WCF service to get users from the ActiveDirectory. I receive parameter from the request (user name) and create response with MembershipUser property. from some reason, the connection get close. the service operation find the user and create the response successfully. when executing the row: "return response;" i got exception on the client side. exception:The underlying connection was closed: The connection was closed unexpectedly inner exception: Response = null Status = System.Net.WebExceptionStatus.ConnectionClosed

谢谢!

推荐答案

我发现使用WCF的跟踪误差。的错误是,XmlSeriazlier不能序列化的MembershipUser,即使它是可序列化的,因为它具有SecurityAttribute太。来源:

i found the error using the WCF trace. the error was that the XmlSeriazlier couldn't serialize the MembershipUser even though it was serializable because it has SecurityAttribute too. source:

http://support.microsoft.com/kb/326971

这篇关于返回的MembershipUser使用WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆