Xamarin Android Player in VirtualBox with Fiddler as Proxy to IISExpress API

So today was another learning experience indeed.  I decided to try Xamarins own Android Emulator today.  I’ve had so many odd problems with the Google Android Emulator that I was getting a bit fed up with using it to be honest.  It seems to have a lot of small issues that make it a pain to use and it has some major issues that under certain circumstances means it won’t work at all.

Anyway, the installation went without a hitch, needed to reboot to get the Host-Only network driver working.  Then I hit a road-block.

I was trying to configure the emulator to use Fiddler as a proxy on the development machine.  In the Google emulators you can configure a proxy using the APN settings for the cellular provider but this isn;t present in the Xamarin emulator so I’ve spent far longer than I should have trying to figure this one out.

By default all the emulators sit behind a virtual router, meaning if you have several emulators running they won’t be able to see your development box nor each other.  They are running in a kind of virtual network environment and each instance is completely isolated on the network.  Add into that the additional abstraction of VirtualBox and you have a pretty complex environment to deal with.

Anyway, I have added in additional bindings to make my IISExpress web sites available over the network and I could contact the API using the IP address but this makes Fiddler ignore the traffic.

The Solution

So, in the Xamarin Emulator you need to setup the proxy settings in the WiFi configuration.

If you’re having lots of issues getting this to work it’s worth checking that VirtualBox has been configured properly during the installation.  For instance when I first installed it, it was configured to use a SubNet mask of so there was no hope of ever getting it to work properly on my development box.  Unless you have a custom setup (which is highly unlikely) this should in fact be

Check VirtualBox Network Settings

Open the VirtualBox application and check the network settings for VirtualBox (not your VM) go to File -> Preferences:


This will show you the adapters created for VirtualBox during the installation.  My particular system needs to be available on #2 so double click the adapter to check/change:


When my system was initially set-up the IPv4 Network Mask was set to meaning it couldn’t see my development box.  It very likely that if you are trying to connect things to your host development box you may need to check what your configuration is (most likely and then set VirtualBox to use the same mask (ipconfig is your friend).

Configuring the Xamarin Android Player

  1. Swipe down from the top of the screen and tap the Settings icon.
  2. Tap Wi-Fi.
  3. Tap and hold your current Wi-Fi network. Select Modify Network.ModifyNetwork
  4. Tap the Show advanced options box.ShowAdvancedOptions
  5. Tap the Proxy settings dropdown and select Manual.IPAddress
  6. Type the IP address and port (usually 8888) of the Fiddler server.IP Address
  7. Tap Save.

To verify this configuration, go to http://ipv4.fiddler:8888/. You should see the Fiddler Echo Service webpage, and the traffic should appear in Fiddler.

This is all tested and working as expected now.


  1. /anon · July 24, 2015 Reply

    Great post. Searched the internet far and wide to find out how to do this. Big Help!

  2. anon2 · November 25, 2015 Reply

    You selected android version what is?

  3. jammer · December 3, 2015 Reply

    I’m not sure I understand the question, although at the moment this is compiled against API 21 with a minimum version of API level 15.

  4. Thomas Burkhart · May 30, 2016 Reply

    Hi Jammer,
    could you please tell me which settings you used for the network adapters? LocalHost/NAT/ etc?

    I fear I messed up my basic inatsllation when trying to connect to an Ubuntuserverimage in VirtualBox.


  5. jammer · June 1, 2016 Reply

    Hi Thomas,

    The VirtualBox NAT view is empty, there isn’t any need for NAT configuration to get this scenario working. The complete configuration for the VirtualBox adapters are:

    IP v4:
    IP v4 Mask:
    Server Mask:

    IP v4:
    IPv4 Mask:
    Server Mask:

    Hope this helps!

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.