Я получаю это на своем производственном сервере, но не на своих машинах разработки или тестирования.Мне трудно понять, что здесь не так.
Error getting value from 'CheckCertificateRevocationList' on 'System.Net.Http.HttpClientHandler'.
at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
Ошибка при попытке сериализации объекта вызова HttpCall из FLURL (https://flurl.io/docs/configuration/#event-handlers)
в приложении init
FlurlHttp.Configure(settings => settings.BeforeCallAsync = HandleFlurlBeforeCallAsync);
Код:
private async Task HandleFlurlBeforeCallAsync(HttpCall call)
{
var serializer = new JsonSerializer
{
Formatting = Formatting.Indented,
ObjectCreationHandling = ObjectCreationHandling.Replace,
MissingMemberHandling = MissingMemberHandling.Ignore,
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
};
using (var sw = new StringWriter())
using (var writer = new JsonTextWriter(sw))
{
serializer.Serialize(writer, new
{
call.FlurlRequest.Url,
call.FlurlRequest.Headers,
call.Request.Content,
call.Request.RequestUri,
call.RequestBody,
call.HttpStatus,
call.ErrorResponseBody
});
var log= sw.ToString();
}
}