【问题标题】:Empty response from asp.net application on emulator来自模拟器上的 asp.net 应用程序的空响应
【发布时间】:2016-04-30 14:33:50
【问题描述】:

在使用 android 模拟器时,我无法从 Visual Studio 浏览到我的 Web 应用程序。我在浏览器上收到一个空响应错误。当我从我的计算机浏览到我的本地应用程序时,它可以工作。我在 android 模拟器上使用了 ip 10.0.2.2 而不是 localhost。任何人都可以帮助我吗?

【问题讨论】:

  • 你能解释一下模拟器是如何使用 10.0.2.2(别名)工作的吗?

标签: android asp.net android-studio android-emulator localhost


【解决方案1】:

检查您的控制台是否有任何错误。我遇到了这个问题并且看到了Failed to validate the certificate chain, error: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.,因为我的本地颁发的证书无效。

用于开发I overrode WebviewClient according to this answer 并且能够使其正常工作。确保在发布到生产环境之前删除,以防止您的应用程序容易受到中间人攻击。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-08-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-15
    • 1970-01-01
    相关资源
    最近更新 更多