Base solution for your next web application
Open Closed

SSL not working #11283


User avatar
0
chrskrs created

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? 10.5
  • What is your product type (Angular or MVC)? MVC
  • What is product framework type (.net framework or .net core)? net 5.0

When I run my MVC app under kestrel with the following configuration

"WebSiteRootAddress": "https://localhost:44302/",
"RedirectAllowedExternalWebSites": "https://localhost:44303/",

With AppUrl = "https://localhost:44303/"

And in My xamarin app I set the DefaultHostUrl = "https://10.0.2.2:44302/" and run in the emulator everything works fine

If I however run on a physical device, I get a Connection Refused error.

so I changed the MVC to use my local machines ip adddress like so:

"WebSiteRootAddress": "https:/192.168.10.26:44302/",
"RedirectAllowedExternalWebSites": "https://192.168.10.26:44303/",

With AppUrl = "https://192.168.10.26:44303/"

The website cannot make a secure connection

And even when iI change Xamarin DefaultHostUrl = "https://192.168.10.26:44302/" The app does not start - both on emulator and physical device.

Can you please assist on the correct configuration and SSL certificates that I will need to run the xamarin app from a physical device

Thank you so much

Chris Krause


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @chrskrs

    Could you run the host app and then try to access it via physical device or via emulator's browser ?

  • User Avatar
    0
    chrskrs created

    I have started the mvc app on the 192.168.10.26 machine and the browser looks like this

    From my physical device if I browse to http://192.168.10.26:44302 I get 192.168.10.26 did not send any data ERR_EMPTY RESPONSE

    If I browse to https://192.168.10.26 I get the same as from the browser on the PC itself - Connection not secure but I see the login screen.

    The emularor is on a different network (ip address unknow) but the gateway is set to 10.0.2.2 and I cannot reach the PC from the emulators browse at all

    Hope this helps

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @chrskrs

    I just replied to your email. This happens probably because your device and emulator can't access to your computer. Seems like a network issue.