aspnetcore-app-workshop icon indicating copy to clipboard operation
aspnetcore-app-workshop copied to clipboard

HttpRequestException: The SSL connection could not be established, see inner exception.

Open ffrankozz opened this issue 6 years ago • 5 comments

IOException: The handshake failed due to an unexpected packet format. FrontEnd cannot establish connection with BackEnd api.

ffrankozz avatar Feb 23 '19 11:02 ffrankozz

Double-check the URL you've configured for the FrontEnd to talk to the BackEnd. HTTPS and HTTP are on separate ports and you must ensure you use the right port. Check that the BackEnd works over HTTPS and then ensure you're using that URL in the FrontEnd's appsettings.json file.

DamianEdwards avatar Jun 24 '19 23:06 DamianEdwards

I have the same issue and can't solve it. The configuration files are correct I think,

{
  "$schema": "http://json.schemastore.org/launchsettings.json",
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:56009/",
      "sslPort": 44360
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "AASPNETCORE_HTTPS_PORT": "44360",
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "Backend": {
      "commandName": "Project",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "applicationUrl": "https://localhost:44360;http://localhost:56009"
    }
  }
}
{
  "ServiceUrl": "https://localhost:44360/",
  "Logging": {
    "LogLevel": {
      "Default": "Warning"
    }
  },
  "AllowedHosts": "*"
}

manniealfaro avatar Nov 03 '19 07:11 manniealfaro

How are you launching the apps? Via Visual Studio or the cmd line? Can you confirm that the back-end is listening and serving the Swashbuckle (Swagger) UI via the configured HTTPS URL?

DamianEdwards avatar Nov 05 '19 22:11 DamianEdwards

for this challenge. i set my lauchsetting for frontend like this

"FrontEnd": { "commandName": "Project", "launchBrowser": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }, "applicationUrl": "http://localhost:55994", // didnt use https "sslPort": 44374 } }

BionStt avatar Oct 14 '21 08:10 BionStt

Hi,

Maybe it is no longer important but anyway. What was happening for me, the concatenation of the base address for the FrontEnd API service was not working. So I' was trying to access an address that did not exist.

It could be something similiar for you.

manniealfaro avatar Oct 27 '21 05:10 manniealfaro