August 2022

  • Handle the HTTP 500 Response in APIM

    APIM Add Retry Policy using Policy Fragment A connection that was expected to be kept alive was closed by the server We were seeing many API responses with status code 500 in APIM, with Exception type = BackendConnectionFailure: The underlying connection was closed: A connection that was expected to be kept alive was closed by…

    Know More

  • APIM Policy to Retrieve D365 Bearer Token

    The policy below adds the “Authorization” header to the backend request.  All token request parameters are added to APIM as Named values.  The “D365-secret” named value points to a secret in the key vault so that it is kept private.  A retry policy is also added in case there is an issue retrieving the bearer…

    Know More

  • Remove Duplicate Rows from a SQL Table

    A small reminder for myself: delete t from ( SELECT * , DupRank = ROW_NUMBER() OVER (               PARTITION BY PurchaseOrderNumber, LineNumber               ORDER BY (SELECT NULL)             ) FROM [PurchaseOrderLines] ) as t where DupRank > 1

    Know More

  • Deploy Azure Durable Function with Zero Downtime

    Requirement To deploy a new version of an Azure Durable Function using Terraform to a Function App with zero downtime Release Pipeline The production deployment is triggered when a modification to the main repository branch is committed.  The production release pipeline path looks like this:   Plan & Apply Steps include the following tasks: Install…

    Know More