繁体   English   中英

Xamarin:显示存储在本地 IIS 服务器上的图像

[英]Xamarin : display image stored on local IIS server

我正在为 Android 和 Web 应用程序 Z9E0DA8438E1E38A1C30F4B76CE7 实施 Xamarin 应用程序。 Xamarin 应用使用 Web 应用的服务。 目前,IIS 服务器在我的 PC 上本地运行,我正在我自己的设备(不是模拟器)上测试 Xamarin 应用程序。 为了能够从我的智能手机访问服务器,我在 Visual Studio 中安装了 Conveyor,它允许远程访问开发 web 服务器。

一切正常,Xamarin 应用程序可以使用 Web 服务。 其中,Xamarin 应用程序将图像发送到服务器,服务器将它们存储在本地名为“Uploads”的文件夹中。

我面临的问题是在我的 Xamarin 应用程序中显示这些图像。 首先,我向服务器询问存储到数据库中的图像路径。 我得到的路径很好,就像: https://192.168.1.25:45455/Uploads/myImage.jpg 服务器 URL 很好,路径也很好。 如果我将其复制到我的 PC 或智能手机上的浏览器中,我会得到图像。 但是在我的 Xamarin 应用程序中,图像没有显示。 在控制台中,我有以下错误:

Image Loading: Error getting stream for https://192.168.1.25:45455/Uploads/myImage.jpg : System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.Security.Authentication.AuthenticationException:身份验证失败,请参阅内部异常。 ---> Mono.Btls.MonoBtlsException: Ssl error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED at /Users/builder/jenkins/workspace/archive-mono/2019-10/android/release/external/boringssl/ssl/handshake_client .c:1132

I guess it is a certificate issue, but I don't understand why it is not working in this case and everything works fine when I consume web services with the same server URL: https://192.168.1.25:45455/api/MyService .

我尝试了几件事,但未能成功。

我现在已经修好了。 由于传送带,这确实是证书问题。 要修复它,只需按照以下步骤操作: https://conveyor.cloud/help/ssl

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM