2017-02-09 33 views
0

我创建了一个C#Blob触发函数。它默认生成此代码:创建新的Azure功能时出现此错误的原因是什么?

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"); 
} 

并立即在红色弹出窗口中显示以下错误。

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

修复是改变路径中的“集成”有一个附加“/(名称)”

+0

是的,你可以更改路径模板,因为你需要设置。如果您不需要它,也可以删除{name}表达式(删除相应的方法参数)。 – mathewc

相关问题