Description
A clear and concise description of what the bug is. Use screenshots as necessary.
To Reproduce
Code to reproduce the bug, which someone else can run.
Version Info
Stylet version: [e.g. 1.2.3]
Runtime version: [e.g. 5.0.300]
Additional Info
Add any other context about the problem here.
// code e.g.
internal class Bootstrapper : Bootstrapper
{
var clientCertificate = new X509Certificate2(Path.Combine(Environment.CurrentDirectory, "****.pfx"), "1111");
var handler = new HttpClientHandler();
handler.ClientCertificates.Add(clientCertificate);
// one
handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
// two
//handler.ServerCertificateCustomValidationCallback = (a, b, c, d) => true
var http3handler = new Http3Handler(handler);
// gRpc channel settings
var grpcChannelOptions = new GrpcChannelOptions { HttpHandler = http3handler };
GrpcChannel? grpcChannel = GrpcChannel.ForAddress("http://localhost:5124", grpcChannelOptions);
// Accounter.AccounterClient is gRpc auto-generated
builder.Bind<Accounter.AccounterClient>().ToFactory(o => new Accounter.AccounterClient(grpcChannel)).InSingletonScope();
Description A clear and concise description of what the bug is. Use screenshots as necessary.
To Reproduce Code to reproduce the bug, which someone else can run.
Version Info
Additional Info Add any other context about the problem here.
// code e.g. internal class Bootstrapper : Bootstrapper
{
var clientCertificate = new X509Certificate2(Path.Combine(Environment.CurrentDirectory, "****.pfx"), "1111");
var handler = new HttpClientHandler();
handler.ClientCertificates.Add(clientCertificate); // one handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator; // two //handler.ServerCertificateCustomValidationCallback = (a, b, c, d) => true
}
When vs2022 debug,the output window error:error CS0234:…… so don't run debug or release.