Skip to content

Failed to authenticate HTTPS connection. Conflicting certificates for localhost when using Visual Studio for Mac

Lately, I have been trying Visual Studio for Mac as this version of Visual Studio has evolved significantly. However, something I noticed is that since I don’t use it often, the local SSL certificates created by dotnet in the Mac get a bit screwy.

There is a possibility that you might end up with a conflicting certificate for localhost from creating or setting up applications in the past.

If you work with the Mac version of Visual Studio, and you ever get the following error, run the commands at the bottom to clean up the existing certificates for localhost and create new ones.

Failed to authenticate HTTPS connection. System.IO.IOException: Authentication failed because the remote party has closed the transport stream.

Open the terminal window, browse to your dotnet project and execute the following commands:

$dotnet dev-certs https --clean
$dotnet dev-certs https

Happy coding!

Create and Deploy a React App to Azure using .NET Core and Azure CLI on Mac

Prerequisites

Getting Started

In this tutorial, you’ll set up your Mac to do development using .NET Core and Azure. The tutorial also shows you the new and powerful .NET Core Command Line Interface (CLI) Tools.

After you have installed the .NET Core SDK and Visual Studio for Mac, open a terminal window and type the following:

$ cd /users/

$ cd users/yourusername/projects

$ mkdir samplereactapp 

$ cd samplereactapp

The above commands will do the following: browse to the Mac user’s Projects directory and create a new directory to place the react app that we are about to create.

.NET Core CLI

.NET Core’s Command Line Interface (CLI) is very powerful, it allows you to do a lot without leaving the command line which allows for the fast and straightforward creation of these projects. Double-check your current directory is the new directory you’ve created, in our example this is samplecreateapp. 

To make sure the .NET Core was correctly installed, type dotnet –info in the terminal, you should see output that looks like this:

.net core CLI

Once you have confirmed that you have all the needed prerequisites, let’s continue to build the React web app.Continue Reading →