Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the cause of getting this error when creating a new Azure Function?

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.).

like image 636
Chris Harrington Avatar asked Jan 04 '23 13:01

Chris Harrington


1 Answers

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

like image 146
Chris Harrington Avatar answered Apr 23 '23 22:04

Chris Harrington