4
votes

I created a C# Blob Trigger Function. It generated this code by default:

public static void Run(Stream myBlob, string name, TraceWriter log)
{
    log.Info($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {myBlob.Length} Bytes");
}

and immediately was presented the following error in a red popup.

Error: Function ($BlobTriggerCSharp1) Error: Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.BlobTriggerCSharp1'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'name' to type String. Make sure the parameter Type is supported by the binding. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.).

2

2 Answers

9
votes

Fix was to change the Path setting in "Integrate" to have an appended "/{name}"

0
votes

In my case I had a mismatch between the /{name} and the actual method parameter name (I'd renamed it to blobName without thinking, but not updated the template to match).

Once I used the same in both places i.e. name (or blobName), it worked.