![](/img/trans.png)
[英]The listener for function '' was unable to start. Azure durable function VS 2022
[英]durable function unable to start
我在使用C#中的Azure持久功能时遇到了麻烦。 将此作为示例并尝试从https://docs.microsoft.com/zh-cn/azure/azure-functions/durable-functions-sequence在Visual Studio 2017中启动
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
namespace VSSample
{
public static class HelloSequence
{
[FunctionName("E1_HelloSequence")]
public static async Task<List<string>> Run(
[OrchestrationTrigger] DurableOrchestrationContext context)
{
var outputs = new List<string>();
outputs.Add(await context.CallActivityAsync<string>("E1_SayHello", "Tokyo"));
outputs.Add(await context.CallActivityAsync<string>("E1_SayHello", "Seattle"));
outputs.Add(await context.CallActivityAsync<string>("E1_SayHello", "London"));
// returns ["Hello Tokyo!", "Hello Seattle!", "Hello London!"]
return outputs;
}
[FunctionName("E1_SayHello")]
public static string SayHello([ActivityTrigger] string name)
{
return $"Hello {name}!";
}
}
}
但是我会收到此错误:“函数'E1_SayHello'的侦听器无法启动。Microsoft.WindowsAzure.Storage:无法连接到远程服务器。系统:无法连接到远程服务器。系统:无法连接因为目标计算机主动拒绝了127.0.0.1:10000。
local.settings.json:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true"
}
}
我是否需要做其他事情还是应该立即使用? 我需要在端口10000中拥有什么?
我的蜘蛛般的感觉在这里刺痛
你读过了吗
先决条件
请遵循“ 安装耐用功能”中的说明来设置示例。
先决条件
该错误最有可能试图连接到仿真器,并且未安装或设置。
那你遵循这些步骤了吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.