diff --git a/src/serialization/KiotaSerializer.Serialization.cs b/src/serialization/KiotaSerializer.Serialization.cs index 732b89e4..1a01f2e5 100644 --- a/src/serialization/KiotaSerializer.Serialization.cs +++ b/src/serialization/KiotaSerializer.Serialization.cs @@ -101,7 +101,7 @@ public static Task SerializeAsStringAsync(string contentType, IEnumer private static string GetStringFromStream(Stream stream) { using var reader = new StreamReader(stream); - return reader.ReadToEndAsync().ConfigureAwait(false).GetAwaiter().GetResult(); // so the asp.net projects don't get an error + return reader.ReadToEnd(); } private static async Task GetStringFromStreamAsync(Stream stream, CancellationToken cancellationToken) {