Temmp https://github.com/jasonterando/S3BufferedUpload
Amazon.AWSConfigs.LoggingConfig.LogResponses = Amazon.ResponseLoggingOption.Always;
Amazon.AWSConfigs.LoggingConfig.LogTo = Amazon.LoggingOptions.Console;
Amazon.AWSConfigs.AddTraceListener("Amazon", new System.Diagnostics.ConsoleTraceListener());
var bytes = new byte[size];
RandomNumberGenerator.Create().GetBytes(bytes);
https://dzone.com/articles/quick-and-efficient-distributed-tracing-in-net
Add below entry to the appsettings or configure programatically .Non TLS HTTP2 does not allow protocol negotiation More information here
{
"Kestrel": {
"EndpointDefaults": {
"Protocols": "Http2"
}
}
}
//HttpClient myHttpClient = new HttpClient(new HttpClientHandler ()
//{
// ServerCertificateCustomValidationCallback = (_,_, _, _) => true
//})
HttpClient myHttpClient = new HttpClient()
{
DefaultRequestVersion = HttpVersion.Version20,
DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact
};
string requestUrl = "http://localhost:5123/weatherforecast";
try
{
Console.WriteLine($"GET {requestUrl}.");
HttpResponseMessage response = await myHttpClient.GetAsync(requestUrl);
response.EnsureSuccessStatusCode();
Console.WriteLine($"Response HttpVersion: {response.Version}");
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine($"Response Body Length is: {responseBody.Length}");
Console.WriteLine($"------------Response Body------------");
Console.WriteLine(responseBody);
Console.WriteLine($"------------End of Response Body------------");
}
catch (HttpRequestException e)
{
Console.WriteLine($"HttpRequestException : {e.Message}");
}
Console.WriteLine($"Press Enter to exit....");
Console.ReadLine();
https://josef.codes/using-http2-with-asp-net-core-traefik-kubernetes-container-example/
public class MessageHolder<T>
{
public T Message { get; set; }
}
builder.Services.AddScoped(typeof(MessageHolder<>));
public class WeatherForecastController{
public WeatherForecastController(MessageHolder<string> messageHolder,MessageHolder<StringBuilder> messageHolder1) {
}
}
https://www.meziantou.net/handling-cancelkeypress-using-a-cancellationtoken.htm
https://makolyte.com/csharp-how-to-make-concurrent-requests-with-httpclient/
dotnet build my_project.csproj /binaryLogger
https://www.meziantou.net/mocking-an-httpclient-using-asp-net-core-testserver.htm