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
thanks!
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