2017-02-09 34 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

相關問題