Open NucleoTech opened 6 years ago
Did you set an appsetting in the portal for your function app with name "PlatformEventHub_events" containing your connection string? Because it looks like you might have that in your local settings file but the local file is not used when you're running in Azure.
@NucleoTech Have you got any solution for this issue? I am facing similar issue with EventHubTrigger (2.0). It works correctly on local machine, but after deploying to Azure it says "error: Can't figure out which ctor to call."
I have an EventHubTrigger function (.NET Standard 2.0) developed in Visual Studio that works correctly when running from VS, but fails when invoked on Azure platform [runtime 2.0.11776.0 (beta)]. The failure seems to be a parameter binding issue.
The IOT hub routes messages to the built-in events endpoint. I created a 'hotpath' consumer group.
Investigative information
Please provide the following:
Repro steps
In VS on local PC:
On Azure:
Expected behavior
Function should successfully execute on Azure as it does on local PC.
Actual behavior
Function execution on Azure fails with error: Failure: Exception binding parameter 'myEventHubMessage' Parameter: myEventHubMessage Value: Object reference not set to an instance of an object.
Known workarounds
None
Related information
Provide any related information
Source
```csharp public static class HandleDeviceEvent { [FunctionName("HandleDeviceEvent")] public static void Run( [EventHubTrigger("platformeventhub",Connection = "PlatformEventHub_events", ConsumerGroup = "hotpath")]string myEventHubMessage, [Table("PlatformSummary")] CloudTable platformSummaries, TraceWriter log) { log.Info($"Some message {DateTime.UtcNow}:{myEventHubMessage}"); } } ```