Sunday, October 11, 2015

Azure - Consuming File Storage from .Net

Azure File storage offers file shares in the cloud using the standard SMB protocol. File storage supports both SMB 2.1 and SMB 3.0.Because file shares are SMB shares, you can access them via standard and familiar file system APIs.
I have unit test driven repository on Github to show common uses of File storage.

Sunday, October 04, 2015

Azure - Consuming Event Hubs from .Net

Event Hubs is a service that processes large amounts of event data from connected devices and applications. After you collect data into Event Hubs, you can store the data using a storage cluster or transform it using a real-time analytics provider. This large scale event collection and processing capability is a key component of modern application architectures including the Internet of Things (IoT).

I have unit test driven repository on Github to show common uses of Blob storage.

Friday, September 04, 2015

Azure VM capture is not what it sounds like

I learnt it the hard way. I was trying to capture a snapshot of my VM so that i can reuse to later create a fresh VM in case this one goes bad in anyway. I saw that Azure portal gives you a Capture option for the VM. Without reading any details and going by the name, i went ahead to capture the image. It asked me to run sysprem on the machine, which i did and shutdown the machine. When i went back to capture the image, it warned that it will DLETE this VM after the capture!!! That's what was a huge setback for me. That's not what I had expected a CAPTURE to be.

I did not want to delete that VM so thought to not go ahead with the capture. Guess what, i cannot RDC to my VM any more. Since i could not RDC, i thought may be capturing the image and creating another VM with that image would work. But it did not and the same issue that I could no longer RDC continued even with the machine created with the captured image. I was screwed.

That is very bad. A simple thing, like 'putting the warning that VM would be deleted' before i ran sysprep could have never caused this mess.

Note that i did put effort googling to see if there was any way out but no luck there as well.

Be careful with VM capture on Azure.

Tuesday, July 07, 2015

Azure - Consuming Blob storage from .Net

Azure Blob storage is a service for storing large amounts of unstructured data, such as text or binary data, that can be accessed from anywhere in the world via HTTP or HTTPS. You can use Blob storage to expose data publicly to the world, or to store application data privately.
Common uses of Blob storage include:
  • Serving images or documents directly to a browser
  • Storing files for distributed access
  • Streaming video and audio
  • Performing secure backup and disaster recovery
  • Storing data for analysis by an on-premises or Azure-hosted service
I have unit test driven repository on Github to show common uses of Blob storage.

Sunday, June 14, 2015

Azure - Consuming Queue storage from .Net

Azure Queue storage is a service for storing large numbers of messages that can be accessed from anywhere in the world via authenticated calls using HTTP or HTTPS. A single queue message can be up to 64 KB in size, and a queue can contain millions of messages, up to the total capacity limit of a storage account.

Common uses of Queue storage include:
  • Creating a backlog of work to process asynchronously
  • Passing messages from an Azure Web role to an Azure Worker role
I have unit test driven repository on Github to show common uses of queue storage.

Saturday, June 13, 2015

IoT Hello World - Control LED using Raspberry Pi

I used my Raspberry Pi B+ model to control a Led just to quickly see how easy or difficult it was. It turned out to be pretty straightforward once you have the hardware thins required.

  1. A two pin Led
  2. Two wires 
After i installed Raspebian on the Pi using the standard guide that i have got. I installed WiringPi from

For reference to GPIO pin layout, i referred Connect long leg (+ve) of the LED to pin 11 (GPIO 0) and connect short leg (-ve) to any Ground (I connected to pin 6).

Note that you should also use a resistor on the ground wire to limit the amount of current being passed to the LED otherwise it might damage your LED or even the board. I learnt that usually that happens if you are going to use it for prolonged time but for my 2 sec demo it did not cause any issue without resistor. So do at your own risk.

GPIO pins can be programmatically controlled to be in either input or output mode. I saw that most of them are IN by default. I ran following to see pins status.

gpio readall

See that pin Gpio 0 is in IN mode. Change its mode to OUT as follows-

gpio mode 0 out

Now you are ready to turn on/off the light. Use the following two commands.

For turning on the light - 

gpio write 0 1

For turning off the light

gpio write 0 0

Saturday, June 06, 2015

Installing node on Raspberry PI

Add repository to PI's sources

curl -sLS | sudo bash

Install latest node

Tuesday, June 02, 2015

Save nuget feed credentials

When working we custom Nuget feeds that require authentication, Visual Studio keeps prompting for user name and passwords and you are not able to save the password. This is really frustrating. You can run following command to save your credentials to the nuget.config file.

nuget sources update -name "My Feed Name" -source "" -UserName "dev\sanjay" -Password "password"

Ensure that you have nuget.exe downloaded and your PATH variable is updated with its directory. You can download nuget.exe from following location.

This command updated the machine wide config which is located at %APPDATA%\NuGet\NuGet.Config

Sunday, May 31, 2015

Azure - Consuming Table storage from .Net

The Azure Table storage service stores large amounts of structured data. The service is a NoSQL datastore which accepts authenticated calls from inside and outside the Azure cloud. Azure tables are ideal for storing structured, non-relational data. 
I have unit test driven repository on Github to show common uses of table storage.