。
使用vs 17.3预览1,.net Maui Blazor,我无法在Android中获得HTTPCLCLIENT或WEBREQUEST。我已经尝试了所有Android选项项目设置(空白,托管,Android,Legacy),也是TLS空白和1.2。我已经尝试了各种解决方法:
-
xamarin.android.net.androidMessageHandler client Handler
//用于消息处理程序 servicepointManager.CheckCertificateReateRevecationListlist = false;
>servicepointManager.ServerCertificateValidationCallback =委托{return true; };
我尝试了所有这些不同的组合,并在Android设备上形成了Android模拟器。
我来的壁橱与WebRequest一起: 状态:Unknownerror 消息:无法建立SSL连接,请参见内部异常。
有人设法打了HTTPS吗?有什么想法或建议吗?
提前致谢,
富有的
WebRequest request = WebRequest.Create("https://fonts.googleapis.com"); // any https site
request.Method = "POST";
string postData = win;
byte[] byteArray = Encoding.UTF8.GetBytes(postData);
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,我已经能够无问题地使它起作用。这应该有帮助。
我仍然无法让Maui Android使用ServiceModel连接。该应用程序将在Windows和iOS上编译和运行,而不会发生任何事件,但不要使用Android。
Yes, I have been able to get it to work without issues. This should help.
.Net Maui Blazor - Does HttpClient or WebRequest work at all?
I still cannot get Maui Android to work with ServiceModel connection. The app will compile and run on windows and ios without incident but not Android.