Microsoft.Azure.WebJobs.Host: Error indexing method

API 21 Reputation points
2021-08-05T17:20:33.397+00:00

When adding a queueTrigger in my project i get this error

The 'AutoAssign' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'AutoAssign'. Microsoft.Azure.WebJobs.Extensions.Storage: Storage account connection string 'AzureStorageAccount' does not exist. Make sure that it is a defined App Setting.
This is my queue code

120837-code.png

That just happens when i execute my project in Visual Studio, not even when i'm calling the queue, and this just happens when i add a queue not even a httpTrigger or timerTrigger

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
0 comments No comments
{count} votes

Answer accepted by question author
  1. MayankBargali-MSFT 70,986 Reputation points Moderator
    2021-08-06T04:04:11.88+00:00

    @API As per the error message you have define the Connection="AzureStorageAccount" for QueueTrigger. Please make sure that you have define AzureStorageAccount as the key and value as storage account connection string in your local.settings.json if you are testing in local environment. If you have deployed in azure function app then it should be in application setting configuration.

    The 'AutoAssign' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'AutoAssign'. Microsoft.Azure.WebJobs.Extensions.Storage: Storage account connection string 'AzureStorageAccount' does not exist. Make sure that it is a defined App Setting.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.