服务织物错误:未授权连接

问题描述 投票:0回答:2

我试图运行在这里找到一个服务织物例如:

Service Fabric Getting Started Sample

我加载它到Visual Studio 2017年行政长官。我已经设置了面料的应用程序为启动项目,它似乎来构建和部署就好了。

Visual Studio 2017 CE

服务织物仪表盘显示一切正常运行。

Fabric Dashboard

然而,当我尝试使用示例Web服务项目我碰到下面的错误连接:

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()

我看到那里的人得到这一点,因为他们已经改变了启动项目比其他GettingStartedApplication东西,不幸的是,这不是我的问题。

visual-studio-2017 azure-service-fabric
2个回答
3
投票

设置服务织物应用为启动项目,而不是服务织物服务和错误将会消失


0
投票

正如我通过将WebService的web.config挖我发现要使用的端口连接到例如应用程序(端口8081)。我试图推出在调试模式下WebService的实例(不完全理解如何在代码工作),这就是为什么我得到了错误的信息。希望这会帮助别人。

© www.soinside.com 2019 - 2024. All rights reserved.