При вызове веб сервиса через анонимный вызов, получаю ошибку в ответе
Request Error
The server encountered an error processing the request. The exception message is 'Incoming message for
operation 'CreateLead' (contract 'LeadService.svc' with namespace 'http://tempuri.org/')
contains an unrecognized http body format value 'Json'. The expected body format value is 'Raw'. This can be
because a WebContentTypeMapper has not been configured on the binding. See the documentation of
WebContentTypeMapper for more details.'. See server logs for more details. The exception stack trace is:
вызов произвожу с помощью
0/ServiceModel/LeadService.svc/CreateLead
при этом , если вызываю с помощью куки авторизации , то все норм
Сигнатура метода
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "CreateLead", BodyStyle = WebMessageBodyStyle.Bare,
RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
public LeadDataResponse CreateLead(Stream request) {модель
[DataContract]
public class LeadDataResponse {
[DataMember]
public Guid LeadID {
get;
set;
}
[DataMember]
public int ResultCode {
get;
set;
}
[DataMember]
public string ResultDescription {
get;
set;
}
}
Нравится
Игорь, добрый день.
Если вам нужна помощь в решении данной проблемы - обратитесь, пожалуйста, в поддержку. Для качественного анализа данной проблемы необходима коллекция Postman и безопасный доступ к данному приложению.