You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I debug the WPF project and set a breakpoint at the end of the method, the prperty miHandler.ClientCertificates in the method in the library class is not null. However, if I debug the MAUI project in an android phone and debug, the property miHandler.ClientCertificates is null.
My objective it is to use a gRPC client that uses certificates and I could use in many clients, MAUI and WPF in this case. But if the ClientCertificates property is null, I can't set the certificates in the MAUI project.
I Have added a solution that reproduce the problem.
Steps to Reproduce
1.- Create a new solution.
2.- Create a class library with target is .NET 6.0.
3.- Create a class with a method with the code that create a new HttpCientHander.
4.- Create a MAUI project with target .NET 6.0.
5.- Create a button that instantiate an object of the class library.
6.- Debug the MAUI project and see the value of the property miHanlder.ClientCertificates. It should to be null (this is the error)
7.- Create a WPF application that targets .NET 6.0.
8.- Add a new button which code instantiate an onject of type of the class in the library.
9.- Debug the WPF project and check the value of miHandler.ClientCertificates property. It should be not null. This is correct.
Version with bug
6.0.486 (current)
Last version that worked well
6.0.424
Affected platforms
Android
Affected platform versions
Android 12
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
jfversluis
changed the title
When I try to create a handler in the client for a gRPC service HttpClienHandler.ClientCertificates is null
When I try to create a handler in the client for a gRPC service HttpClientHandler.ClientCertificates is null
Aug 15, 2022
Hey there @ComptonAlvaro thank you for the report! I doubt it this has to do with .NET MAUI. The HttpClientHandler is not an object in our codebase. I would think that if you do this on a Android app that's not using .NET MAUI it would reproduce as well. Please have a look at the https://github.com/dotnet/runtime repo if they have an open issue for this and if not open one there, they should know more.
Description
I have a solution with 3 project. All projects are targeted as .NET 6.0.
First one is a class library with one class, in which constructor I have this code:
The second project is a MAUI project.
In the click button of the main page I have this code:
The third project is a WPF project, in which in a click event of a button in the main window I have this code in the code-behind:
When I debug the WPF project and set a breakpoint at the end of the method, the prperty miHandler.ClientCertificates in the method in the library class is not null. However, if I debug the MAUI project in an android phone and debug, the property miHandler.ClientCertificates is null.
My objective it is to use a gRPC client that uses certificates and I could use in many clients, MAUI and WPF in this case. But if the ClientCertificates property is null, I can't set the certificates in the MAUI project.
HttpHandlerError.zip
Thanks.
I Have added a solution that reproduce the problem.
Steps to Reproduce
1.- Create a new solution.
2.- Create a class library with target is .NET 6.0.
3.- Create a class with a method with the code that create a new HttpCientHander.
4.- Create a MAUI project with target .NET 6.0.
5.- Create a button that instantiate an object of the class library.
6.- Debug the MAUI project and see the value of the property miHanlder.ClientCertificates. It should to be null (this is the error)
7.- Create a WPF application that targets .NET 6.0.
8.- Add a new button which code instantiate an onject of type of the class in the library.
9.- Debug the WPF project and check the value of miHandler.ClientCertificates property. It should be not null. This is correct.
Version with bug
6.0.486 (current)
Last version that worked well
6.0.424
Affected platforms
Android
Affected platform versions
Android 12
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: