[Azure Service Fabric] Use of EnableDefaultServicesUpgrade property

Recently I had this issue where Service Fabric application upgrade fails to deploy as expected after changing the instance count in cloud.xml. Here is what I tried and error received. problem:- Create a stateless project with latest Azure Service fabric sdk 5.5 Deploy first with Stateless1_InstanceCount set to –1  (default) Now set Stateless1_InstanceCount to say…


[Azure Billing] Sample REST API postman request

Azure Billing REST API helps to predict and manage Azure costs.  Following API’s are there to query the billing data. 1) Resource Usage (Preview) Get consumption data for an Azure subscription- https://msdn.microsoft.com/en-us/library/azure/mt219001.aspx Sample working query:-https://management.azure.com/subscriptions/your-subscription-id/providers/Microsoft.Commerce/UsageAggregates?api-version=2015-06-01-preview&reportedStartTime=2014-05-01T00%3a00%3a00%2b00%3a00&reportedEndTime=2017-04-01T00%3a00%3a00%2b00%3a00&aggregationGranularity=Daily&showDetails=false 2) Resource RateCard (Preview) Get price and metadata information for resources used in an Azure subscription- https://msdn.microsoft.com/en-us/library/azure/mt219004.aspx Sample working query:-https://management.azure.com/subscriptions/your-subscription-id/providers/Microsoft.Commerce/RateCard?api-version=2016-08-31-preview&$filter=OfferDurableId…


[Azure Powershell] How to improve the performance of BlobCopy by placing inline C#.NET code

Performance issues are always hard and tricky to fix. Recently I had this ask to check why the given Powershell execution takes time and gets slower on heavy iteration. In the beginning, copy operation used to take only few mins but over a heavy iteration, we saw the performance degraded to 2x, 3x.. Sample looping…


[Azure Storage] How to call Storage API’s from Powershell (without SDK)

Recently I had this ask from a partner who wanted sample code for making REST API call to storage without our SDK’s route. Though we have array of SDK’s supporting many languages, still he wanted to make clean REST calls without SDK’s. It some time to understand and create this proof of concept. So sharing…


[Azure CDN] How to Purge CDN content from C# code

Recently I had a chance to work on this ask where one of the developer wanted a sample code to purge the CDN content by hitting this REST API instead portal. Initially I followed this link but do not wanted to give my username and password as explained there for AAD authentication. I wanted to…


[Azure Functions] Intro to Serverless applications in Azure

“Serverless computing(SC)” is a most cited buzzword in cloud computing after AI/ML, microservices, IoT, AR/VR/MR etc. Almost all the tech conferences has at least one session around this topic in their slot. Serverless computing is there for sometime now but recently getting adapted and used in conjunction with various cloud born solutions because of its easiness….


[AzureKeyVault] How to retrieve Keyvault secrets using C# code

Azure Key Vault needs no introduction, it’s already adapted by Azure developers to safeguard keys and secrets used by cloud applications and services. – it used to encrypt keys and secrets (such as authentication keys, storage account keys, data encryption keys, .PFX files, and passwords) by using keys that are protected by hardware security modules…


[Service Fabric] How to Secure a standalone cluster (On Prem)

This blog post is based on this article –https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-creation-for-windows-server; I ran into issue, so would like to break into step by step for easier reference along with precautions. Step 1 and 2 objective is same. All we need here is, just make sure to have NETWORK SERVICE added and have permission set. 1) Install the…


Add-AzureAccount issue: Your Azure credentials have not been set up or have expired

For some reason, I started experiencing this issue. Tried clearing the local cache, temp folders or cookies etc but none helped. So grabbed fiddler log to see what is going wrong. Noticed it was having the very old session token (3-4 months older) getting served for some reason and no clue where it lies also….


[Azure Batch] Server failed to authenticate the request

Today happen to work on this problem, where developer running unit test code creating Azure Batch Jobs in row and check the status in a tight loop getting forbidden error. Interestingly, it worked for him for the first couple of calls “job” creation but fails continuously after that in row. Grabbed the the fiddler log…