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

Handling CORS Policy In Azure Functions

Option 1: In Azure Portal Cross-Origin Resource Sharing (CORS) allows JavaScript code running in a browser on an external host to interact with your backend. Specify the origins that should be allowed to make cross-origin calls (for example: http://example.com:12345). To allow all, use “*” and remove all other origins from the list. Slashes are not... » read more

Azure Function Get Environment Variable using local.settings.json

To get an environment variable or an app setting value, use System.Environment.GetEnvironmentVariable, as shown in the following code example: local.settings.json Note: Microsoft recommends this method because it works both locally with local.settings.json and in Azure. App settings can be read from environment variables both when developing locally and when running in Azure. When developing locally,... » read more

Run Timer Triggered Azure Function Locally

Gets or sets a value indicating whether the function should be invoked immediately on startup. After the initial startup run, the function will be run on schedule thereafter. Sources: https://stackoverflow.com/questions/46556621/what-is-the-simplest-way-to-run-a-timer-triggered-azure-function-locally-once

Reference System.Data.SqlClient not found

Microsoft has removed System.Data.SqlClient from the default installation of Visual Studio (.NET Core). In order to use it, you must install from NuGet as install-package System.Data.SqlClient.  Once installed, this reference is available for use and code will compile. Sources: https://social.msdn.microsoft.com/Forums/en-US/ec2361a3-1931-4423-bf68-08b206ce67aa/reference-systemdatasqlclient-not-found?forum=netfxbcl

Azure Function Setup Environment Configuration

You can setup Configuration Variables to store database connection strings or keys at the application level. You can get retrieve that value to be used in any of your functions. Azure Function -> Settings -> Configuration -> New application setting MyKey01 = “xxxxxxxxxxxxxxx”

Create SQL Login for SQL Azure Database

Generating Logins Logins are server wide login and password pairs, where the login has the same password across all databases. Here is some sample Transact-SQL that creates a login: You must be connected to the master database on SQL Azure with the administrative login (which you get from the SQL Azure portal) to execute the... » read more

NCRONTAB Used By Azure Function

Example When Triggered 0 */5 * * * * once every five minutes 0 0 * * * * once at the top of every hour 0 0 */2 * * * once every two hours 0 0 9-17 * * * once every hour from 9 AM to 5 PM 0 30 9 *... » read more