developer maker musician

Wednesday, July 27, 2016

Fiddler Extension Development Tips

I recently created a custom Fiddler extension called PowerBIFiddler. Here are a few tricks that I learned along the way.

Re-use Default Fiddler Inspectors

For PowerBI-Fiddler, I wanted to re-use the JSONResponseViewer that Fiddler uses for their “JSON” inspector.  I used JustDecompile to decompile Fiddler.exe and discovered that the default inspectors are located in this DLL: C:\Program Files (x86)\Fiddler2\Inspectors\Standard.dll.  The JSONResponseViewer is sealed, so you have to use a composition pattern instead of inheritance.  You can see an example here:


Inspector loading

Fiddler searches %userprofile%\Documents\Fiddler2\Inspectors and C:\Program Files (x86)\Fiddler2\Inspectors for Inspectors when it launches.  You’ll want to copy your custom Inspectors into either of those folders.  I setup the following Post-build event to automatically copy the DLL over after each build.

mkdir "%userprofile%\My Documents\Fiddler2\Inspectors\"
copy "$(TargetPath)" "%userprofile%\My Documents\Fiddler2\Inspectors\$(TargetFilename)"
copy "Newtonsoft.Json.dll" "%userprofile%\My Documents\Fiddler2\Inspectors\"



To get F5 debugging, you’ll want to set your Start Action to Fiddler.exe, like this:


Learn by Decompiling Existing Extensions

You’ll find a bunch of good examples here: You can install them and then use JustDecompile to see how they were built.

Helpful Links


Saturday, July 9, 2016

How to Install Previous Versions of the Azure Service Fabric SDK

I rebuilt my dev machine recently and reinstalled the Service Fabric 2.1 SDKs from here:

The rest of the devs on my team were still on 2.0 and we weren’t ready to upgrade to 2.1.  There’s no obvious way to install 2.0.  The only way I could find was through the Web Platform Installer.

So if you need to install a previous version of the Service Fabric SDK

1. Download Web Platform Installer

2. Search for “service fabric”


3. Install your desired version.


Friday, July 8, 2016

How to use Visual Micro (Arduino VS Extension) as your Adafruit HUZZAH ESP8266 IDE

I’ve been using the Adafruit Feather HUZZAH ESP8266 board and Visual Micro quite a bit lately.  The Huzzah is a board that includes the ESP8266 WiFi module and a LiPo battery jack – making it really easy to build stand-alone IoT devices.  Visual Micro is a VS extension that allows you to code Arduino projects like any other VS project, including debugging.

Here’s the HUZZAH:


Here’s how I configure Visual Micro to code against it:

1. Install VS 2015 – I have enterprise, but community should work.

2. Install Arduino IDE

3. Install Visual Micro

4. Open VS

5. Configure Visual Micro

You should see the “Configure Ide Locations” dialog popup when you open VS. If you don’t, you can open it by clicking on Configure from the Visual Micro Explorer:



a) Select Arduino 1.6.

b) Enter the path to Arduino.exe, typically c:\program files (x86)\arduino

c) Enter “” into the board manager text box.

6. Click Visual Micro Explorer –> Rescan


You should now see esp8266 in the “Board Package Installer –> All” tree.


7. Click on esp8266 –> 2.3.0 and click OK.


8. Click on “Adafruit” under “Board Package Auto-Discovery”


The “Adafruit HUZZAH ESP8266” options should now be available in the Visual Micro board dropdown menu.


9. Plug your board into a USB port.

10. Select the board and the appropriate COM port. Mine is on COM3.


11. Create a new Visual Micro Project called Huzzah blink.


12. Copy and paste this code into the HuzzahBlink.ino file

13. Click the “Build and Upload” button


You should now see the onboard LED blinking.


Sunday, June 12, 2016

How to Monitor Azure IoT Hub Traffic

You have a couple different options to monitor your incoming and outgoing Azure IoT Hub traffic.

Desktop App

On Windows machines, you can use the Azure IoT Hub Device Explorer utility. Under the Data tab, select your device, click Monitor and you’ll start to see messages in the Event Hub Data



You can also use the iothub-explorer npm package.

npm install -g iothub-explorer@latest

and then

iothub-explorer hubconnectionstring monitor-events deviceid



Thursday, June 9, 2016

Fix for Azure Stream Analytics–Duplicate property names are not allowed

If you see the error “Duplicate property names are not allowed ‘avg’ in your Stream Analytics query it is likely because you aren’t setting up an alias for that property.

Here’s what you may see:


Here’s how to fix it:  Just as an alias for each.