I've spend some hours figuring out why I get the following message:
The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
I've found out that I get this message whenever the webservice attempts to send a property with does have a basic get / set.
Example:
public string Name {get;set;} //Works without problems
public string Name { get { return "test"; } } //Fails
At first attempt it gives me the following error:
The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
If I try it again it gives me the following error:
An error occurred while receiving the HTTP response to http://localhost/webapi3/ProductData.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
In my tracelog I find the following error: No set method for property 'test' in type 'PS.Converter.ApiModel.DefaultBase'
Does this mean a property MUST have a set at all times when using WCF? Or is this is some way configurable ?