0%

.Net core webapi Secure Connection Failed in debug mode

.Net core webapi getting Secure Connection Failed error while debugging

If we initial a .net core webapi project but getting Secure Connection Failed error like this.

We can try some methods below.

  • Enforce ASP.NET Core HTTPS development certificate on Windows

    If we have certification but not trusted, we can use this method.

    • Open Console
    • type “dotnet ooo-certs https –trust”
    • Select yes in the import windows.
  • Opt-out of HTTPS on project creation

    Start a new project without HTTPS

    • Open console.

    • type “dotnet new webapp –no-https”

    • We can create a new project without HTTPS from UI as well.

  • Disable SSL in debug mode.

    If we had choosed the “Configure for HTTPS” but actually we didn’t want to use it. We can use this method.

    • Open the project property page.
    • Go to debug tab.
    • Uncheck Enable SSL.

After Settle down the environment. The website should run properly.

Link