Я потратить несколько часов выяснить, почему я получаю следующее сообщение:Базовое соединение закрыто
The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
Я узнал, что я получаю это сообщение всякий раз, когда вебсервис пытается отправить недвижимость с имеет базовый get/set.
Пример:
public string Name {get;set;} //Works without problems
public string Name { get { return "test"; } } //Fails
В первой попытке он дает мне следующую ошибку:
The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
Если я пытаюсь его снова он дает мне следующую ошибку:
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.
В мой tracelog Я нахожу следующую ошибку: No set method for property 'test' in type 'PS.Converter.ApiModel.DefaultBase'
Означает ли это, что свойство ДОЛЖНО иметь набор во все времена при использовании WCF? Или это как-то настраивается?
увидеть это: http://stackoverflow.com/q/2323277/201088 –