Change Azure website app settings from code

You can also use the Azure Fluent Api. using Microsoft.Azure.Management.Fluent; using Microsoft.Azure.Management.ResourceManager.Fluent; using Microsoft.Azure.Management.ResourceManager.Fluent.Authentication; using Microsoft.Azure.Management.ResourceManager.Fluent.Core; … public void UpdateSetting(string key, string value) { string tenantId = “a5fd91ad-….-….-….-…………”; string clientSecret = “8a9mSPas………………………………=”; string clientId = “3030efa6-….-….-….-…………”; string subscriptionId = “a4a5aff6-….-….-….-…………”; var azureCredentials = new AzureCredentials(new ServicePrincipalLoginInformation { ClientId = clientId, ClientSecret = clientSecret }, tenantId, … Read more

Where do you set and access run-time configuration parameters per environment for service fabric?

In order to have per environment variables for running Service Fabric locally and in the cloud this is what you must do: Add your custom config section and parameters to the Settings.xml file of the Service/Actor project (located at \PackageRoot\Config\Settings.xml from the project root). Leave the parameters blank as we will be setting these elsewhere … Read more

Logging into Azure Ad with Cypress

I managed to solve the Azure AD login by creating the following Cypress custom command: Cypress.Commands.add(‘login’, () => { return cy .request({ method: ‘POST’, url: `https://login.microsoftonline.com/${tenantId}/oauth2/token`, form: true, body: { grant_type: ‘password’, tenant: ‘tenantId’, client_id: ‘clientId’, client_secret: ‘clientSecret’, username: ‘username’, password: ‘password’, resource: ‘clientId’, }, }) .then((response) => { sessionStorage.setItem(‘access_token’, response.body.access_token); }); }); Then you … Read more

Azure Function gives error: System.Drawing is not supported on this platform

It’s not about the CLR, it’s about the sandbox. System.Drawing relies heavily on GDI/GDI+ to do its thing. Because of the somewhat risky nature of those APIs (large attack surface) they are restricted in the App Service sandbox. Win32k.sys (User32/GDI32) Restrictions For the sake of radical attack surface area reduction, the sandbox prevents almost all … Read more

Share variables across stages in Azure DevOps Pipelines

Updated: Share variables across stages feature has been released in Sprint 168 now. Please use below format to access output variables from previous stage: stageDependencies.{stageName}.{jobName}.outputs[‘{stepName}.{variableName}’] Original: Share variables across stages in Azure DevOps Pipelines I’m afraid to say that it does not supported to share the variable which defined in one stage and pass it … Read more

How to create a sub container in azure storage location

Windows Azure doesn’t provide the concept of heirarchical containers, but it does provide a mechanism to traverse heirarchy by convention and API. All containers are stored at the same level. You can gain simliar functionality by using naming conventions for your blob names. For instance, you may create a container named “content” and create blobs … Read more