Azure Function isolated worker fails when binding/converting userProperties

I have created an Azure Function Endpoint in isolated mode. Locally it runs, but when I deploy, I get a binding/conversion error on ‘userProperties’, see below.

Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.NServiceBusFunctionEndpointTrigger-AV.Spotler
 ---> Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException: Result: Failure
Exception: Microsoft.Azure.Functions.Worker.Diagnostics.Exceptions.FunctionInputConverterException: Error converting 1 input parameters for Function 'NServiceBusFunctionEndpointTrigger-AV.Spotler': Cannot convert input parameter 'userProperties' to type 'System.Collections.Generic.IDictionary`2[[System.String, System.Private.CoreLib, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]' from type 'System.String'.
   at Microsoft.Azure.Functions.Worker.Context.Features.DefaultModelBindingFeature.BindFunctionInput(FunctionContext context) in D:\a\1\s\src\DotNetWorker.Core\Context\Features\DefaultModelBindingFeature.cs:line 70

I have no clue how to fix this. I think this is part of the generated NserviceBus trigger?

  • NServiceBus.AzureFunctions.Worker.ServiceBus 2.0.1
  • Microsoft.Azure.Functions.Worker 1.6.0
  • Microsoft.Azure.Functions.Worker.Sdk 1.3.0


We have a fix merged and working on a backport to NServiceBus.AzureFunctions.Worker.ServiceBus 2.0.X

in the meantime, you can use the workaround mentioned in the above issue.

Hope this helps!



The work around worked and the real error (the reason of the retry) is now visible. Thanks!

btw. this happend on azure function v3.0, not v4.0, in my situtation.

Great news. We’re working on a fix and I’ll report back here once its available.

this happend on azure function v3.0, not v4.0, in my situation.

That is interesting we were not able to reproduce this on v3. Were you able to repro both locally and deployed to azure?