Posts

Showing posts from November, 2015

Understanding IP Addressing in Microsoft Azure (DIP, VIP, PIP)

Azure introduced new terms and concepts for IP Addressing. Dynamic IP address (DIP) the internal addresses assigned to VMs either come from a private pool assigned by Azure, or if you configure an Azure virtual network (VNET), you can define your own private IP addresses ranges and subnets survive OS reboots and service healing migration events but when stopped, it might be assigned a different DIP when re-provisioned Virtual IP address (VIP) Azure randomly assigns cloud services a VIP released when all VMs in a cloud service are deallocated (stopped) VIP is shared by all VMs in the same cloud service Microsoft allows you to reserve up to five VIPs in an Azure subscription on VMs with multiple NICs, only supported on a VM’s default NIC Instance-level public IP address (PIP) are assigned to a VMs default NIC, and are exposed directly to the Internet, so traffic should be controlled using the W

C# Catching Exceptions Guideline (updated for C# 6.0)

The article proposes and summarizes guidelines for exception handling / catching exceptions. AVOID catching exceptions that you’re unable to handle fully. AVOID hiding (discarding) exceptions you don’t fully handle. DO use throw to rethrow an exception; rather than throw inside a catch block. DO set the wrapping exception’s InnerException property with the caught exception unless doing so exposes private data. CONSIDER an exception condition in favor of having to rethrow an exception after capturing one you can’t handle. AVOID throwing exceptions from exception conditional expression. DO use caution when rethrowing different exceptions. Rarely use System.Exception and general catch blocks—except to log the exception before shutting down the application. AVOID exception reporting or logging lower in the call stack. Sources: Essential .NET - C# Exception Handling, by Mark Michaelis, November 2015 Review of the details of each of the guidelines