Where Did Application Insights Put my Performance Counter Data?

I ran into an issue finding performance counter values I had pushed to Application Insights and wanted to note it to save others some time. You can configure Azure Diagnostics (WAD) to push diagnostic and performance data to Application Insights: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/azure-diagnostics-configure-application-insights Once you configure WAD to sink data to Application Insights, you can go into…

0

Controlling the Number of Outgoing Connections From HttpClient (.Net Core or Full Framework)

Although there are references to this all over the web for full framework, I had trouble finding it for .Net Core, so I thought I’d note it for others that may be searching. On .Net Full framework, you can control the number of outgoing client connections by setting ServicePointManager.DefaultConnectionLimit to the desired number. It is…

0

Add Azure Antimalware Extension to a VM Scale Set

If you’re running a Windows Server 2016 base image, ignore this post because we’ve built Windows Defender in. However, if you’re running Server 2012R2, for example, and wish to apply the Microsoft Antimalware Extension to an existing VM Scale Set, here is a PowerShell script to do it: # Add the Microsoft Antimalware Extension to…

0

How to Trap Uncaught Exceptions and Avoid 5xx Errors in ASP.Net WebAPI

I was recently writing a WebAPI 2.x project for a customer that involved file IO, decompression, and database IO. Though the things the API does are not complex, there are many things that can go wrong in any of those types of operations that can cause exceptions to be thrown (SQL parsing errors, IO errors,…

0

How to Remove the Server Header from WebListener

Sometimes enterprises or those hosting web sites wish to remove the Server HTTP response header so they can make it more difficult for an attacker to determine what type of web server they are using (IIS, Apache, etc). Though it is doubtful as to how much protection this actually provides, it is still a common…

0

How Do I Set Up A .Net Core WebListener With SSL?

I’ve been doing a lot of research on Service Fabric and Windows Docker Containers lately. These are natural platforms for .Net Core, which added another learning item to my list: .Net Core. As a result, I set out to get a .Net Core WebListener web server up and running on Windows Server Core 2016. I…

0

How Do I Open Ports with PowerShell?

If you have a history with Windows, you’re probably used to using netsh to open ports on the Windows Firewall. We have a whole slew of PowerShell cmdlets to administer the Windows Firewall now and I wondered how to use PowerShell to open ports. It took me longer than it should have to do it,…

0

How to Use PowerShell DSC to Prepare a Data Drive on an Azure VM

Introduction I was asked how to automate formatting a data drive on an Azure VM. The drive had been provisioned already when the infrastructure was created via ARM script, however the disk was raw. I developed this solution with Azure PowerShell Desired State Configuration (DSC), Azure PowerShell 1.0 (newest release as of April 2016), and…

0

How to Convert a VMWare VMDK to Hyper-V VHD

A customer, who is a VMWare shop, gave me a VMDK file of one of their VMs for development purposes. I don’t have VMWare, but I do have Hyper-V on my dev boxes, so I needed to convert the VMDK virtual disk to a format I could connect to a Hyper-V VM. Microsoft offers a…

25

C# Code to Zip Files and Upload to Azure Storage

If you need code to zip some files into an archive and upload it to Azure blob storage, here is a sample for you. Once the data is in Azure Storage, you could use the WebJobs SDK to trigger your Azure application to work on it (for example, ETL into Azure SQL Database). Create a…

2