Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Service Fabric Error: Not authorized to connect

I am attempting to run a Service Fabric example found here:

Service Fabric Getting Started Sample

I am loading it into Visual Studio 2017 CE. I have set the Fabric app as the startup project and it appears to build and deploy just fine.

Visual Studio 2017 CE

The Service Fabric dashboard shows everything up and running.

Fabric Dashboard

However, when I try to connect using the example WebService project I get the following error:

WebService> Unhandled Exception: System.Fabric.FabricConnectionDeniedException: Not authorized to connect ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x80071C43
WebService>    at System.Fabric.Interop.NativeRuntime.FabricEndGetNodeContext(IFabricAsyncOperationContext context)
WebService>    at System.Fabric.FabricRuntime.NativeFabricRuntimeFactory.GetNodeContextEndWrapper(IFabricAsyncOperationContext context)
WebService>    at System.Fabric.Interop.AsyncCallOutAdapter2`1.Finish(IFabricAsyncOperationContext context, Boolean expectedCompletedSynchronously)
WebService>    --- End of inner exception stack trace ---
WebService>    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
WebService>    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
WebService>    at Microsoft.ServiceFabric.Services.Runtime.RuntimeContext.<GetOrCreateAsync>d__14.MoveNext()
WebService> --- End of stack trace from previous location where exception was thrown ---
WebService>    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
WebService>    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
WebService>    at Microsoft.ServiceFabric.Services.Runtime.ServiceRuntime.<RegisterServiceAsync>d__0.MoveNext()
WebService> --- End of stack trace from previous location where exception was thrown ---
WebService>    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
WebService>    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
WebService>    at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
WebService>    at WebService.Program.Main()

I've seen where people get this because they have changed the startup project to something other than GettingStartedApplication, unfortunately that's not my issue.

like image 994
TrevorBrooks Avatar asked Dec 04 '22 19:12

TrevorBrooks


1 Answers

Set Service Fabric applications(Orange color projects) as the Startup Projects and not the .Net projects and then the error should be gone

like image 148
Heshan Avatar answered Dec 26 '22 07:12

Heshan