簡體   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