When starting playing with Service Fabric in Visual Studio, you may come to the following error when trying to debug your application:

System.Fabric.FabricConnectionDeniedException: 'Not authorized to connect'

Inner Exception
COMException: Exception from HRESULT: 0x80071C43

The error although may look tricky, is very easy to fix and happens when you have created a Service Fabric application and accidentally Set as Startup Project the Fabric Service, as showing in the following picture:

So, Set as Startup Project the Service Fabric application and not the Service Fabric service and the error will be gone.


Categorized in:

Tagged in: