Replies: 8 comments 1 reply
-
Hi @cosocc. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Beta Was this translation helpful? Give feedback.
-
thanks for your reply! |
Beta Was this translation helpful? Give feedback.
-
@jonathanpeppers @steveisok thoughts? |
Beta Was this translation helpful? Give feedback.
-
@simonrozsival would likely know more. |
Beta Was this translation helpful? Give feedback.
-
@cosocc what TLS certificate does the MySQL server use? I would expect this failure in the case of self-signed certificates. Unfortunately, working with self-signed certificates is a bit cumbersome on Android. You will likely need to install the TLS certificate on the Android device or use network security config to tell Android to trust your certificate. |
Beta Was this translation helpful? Give feedback.
-
关于linux服务器配置问题: 暂时这里是我存放的位置 cd /etc/mysql/mysql.conf.d# /etc/mysql/mysql.conf.d# openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 等待片刻会让你输入认证密码: step4: step5: step6: step7: Oraganizational Unit Name (eg, section) []:Development Team step8: step9: 到这里已经生成了 cert.pem key.pem vim mysqld.cnf [mysqld] 保存退出: wq 然后在项目中进行相关的配置
复制代码 D:\MauiMsql\Platforms\Android\Resources\xml\network_security_config.xml
复制代码 D:\MauiMsql\Platforms\Android\Resources\raw\cert.pem |
Beta Was this translation helpful? Give feedback.
-
Sorry, my English is not good, so some places directly use Chinese! |
Beta Was this translation helpful? Give feedback.
-
Yes, trying to connect to anything from android by default requires a secure connection. Usually you can configure exceptions for this, but obviously that is not recommended. I'd like to also touch on the fact that connecting directly to a database from an app is generally considered a bad practice. Please do not do this. It is better practice to create an intermediate service to proxy the calls to the database. Doing so allows you to keep the database from being exposed, and leverage a better authentication architecture which does not require client secrets or passwords to be stored on the device, but instead the usage of short lived access tokens and refresh tokens. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Debugging works fine on Windows, but when I switch to running it on a mobile device, I encounter numerous errors.
Steps to Reproduce
No response
Link to public reproduction project repository
https://github.com/cosocc/MauiMsql.git
Version with bug
7.0.92
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
Beta Was this translation helpful? Give feedback.
All reactions