The listener for function 'functionName' was unable to start. <--- Forbidden

Viewed 72

I am trying to implement azure durable functions in C# I have few activity triggers there myActitivityTrigger1,myActitivityTrigger2

Its all working fine locally (From Visual Studio). But when I deployed it into azure, it starts saying

The listener for function 'myActitivityTrigger1' was unable to start. <--- Forbidden

[FunctionName("dqService")]
public static async Task<string> InvokeObjectMetadata([ActivityTrigger] string name, ILogger log)
{
    await Task.Delay(10000);
    //log.LogInformation($"ObjectMetadata fired");
    Console.ForegroundColor = ConsoleColor.Green;
    Console.WriteLine("Dq Service Fired");
    return $"Hello {name}!";
}

What could be the reason this is firing in azure only

1 Answers

We have also tried to recreate the issue from our end but its working fine withput giving us any error.

Workaround that we follow;

  • Created Durable function using .net and tested locally with the added connection string of our storage account in localsettings.json ( in VS CODE) and it returns as expected.

enter image description here

  • And then deploy the function to our function app and make sure that we have the correct connection string as on localsettings.json file because its not being deploy . Then call the function with providing correct uri with function name .

    https://orc************.azurewebsites.net/api/DurableFunctionsOrchestrationCSharp1_HttpStart

OUTPUT DETAILS:- enter image description here

enter image description here enter image description here

For more information please refer this MICROSOFT DOCUMENTATION.

Related