Reputation: 57
I'm having trouble to get started with azure durable functions in c#. Took this as sample and tried to start it in visual studio 2017 from https://learn.microsoft.com/en-us/azure/azure-functions/durable-functions-sequence
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}!";
}
}
}
But I'll get this error: "The listener for function 'E1_SayHello' was unable to start. Microsoft.WindowsAzure.Storage: Unable to connect to the remote server. System: Unable to connect to the remote server. System: No connection could be made because the target machine actively refused it 127.0.0.1:10000."
local.settings.json:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true"
}
}
Do i need something else to be done or should this work out of the box? What I need to have in port 10000?
Upvotes: 2
Views: 2785
Reputation: 1083
Add "AzureWebJobsSecretStorageType": "files"
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
"AzureWebJobsSecretStorageType": "files"
}
Upvotes: 0
Reputation: 81573
My spidey senses are tingling here
Did you read
Function chaining in Durable Functions - Hello sequence sample
Prerequisites
Follow the instructions in Install Durable Functions to set up the sample.
Install the Durable Functions extension and samples (Azure Functions)
Prerequisites
The error is most likely trying to connect to the emulator and is not installed or set up.
So did you follow these steps?
Use the Azure storage emulator for development and testing
Upvotes: 2