Azure Function – Change Port

Issue: http://localhost:7071 already in use by another running Azure app. Resolution: Change your current Azure Function app to run under another port. local.settings.json

Azure Functions time zone issue

Fix: Select Configuration option in your Function App Add new “application settings” Fill the fields with the following value… Name: WEBSITE_TIME_ZONEValue: Pacific Standard Time Sources:

Access to fetch at ‘xxxxx’ from origin ‘xxxxxxx’ has been blocked by CORS policy for Azure Function App

Error: Access to fetch at ‘xxxxx’ from origin ‘xxxxxxx’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled. Issue: Cross-Origin... » read more

Azure Function From Queue to Blob or CosmosDB

From Azure Queue to Azure Storage Blob Container From Azure Queue to Azure NoSQL CosmosDB Container Sources:

CosmosDB Trigger Azure Function

Get specified field value… Note: Make sure you installed the Microsoft.Azure.WebJobs.Extensions.CosmosDB package. Created a CosmosDB connection string (Get string value from Azure Portal). Created a container called “leases” or set CreateLeaseCollectionIfNotExists =true.

Set Azure Function Time Zone for Timer Trigger

Azure Function based on Web app sandbox. Web app need you to set the timezone in env settings first. The timetrigger attribute is the declaration part of the function. The environment variables will be checked here. If you do not set the environment variables about the time zone in advance, it will be processed according... » read more

Error: input is not a valid Base-64 string

Error: Get the following error when trying to process a json object within Azure Function. System.Private.CoreLib: Exception while executing function: xxxxxxxx. Microsoft.Azure.WebJobs.Host: Exception binding parameter 'myQueueItem'. System.Private.CoreLib: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.... » read more

Azure Function Queue Trigger Retry

Azure functions with Storage Queue trigger has a built in retry logic based on the dequeue count of the message in the queue. You can configure the frequency of the retry in the bindings either through code or host.json. After the max number of retry, the message will be placed in the <queue-name>-poison queue. visibilityTimeout property... » read more