Windows 8 Store apps are not allowed to connect to localhost using any network connection type like a simple http request. For developers Visual Studio 2012 automatically exempts your Windows Store App projects by putting them into the right isolation level, but for your Unit Test projects Visual Studio does not do the same. So, to connect to localhost – or just if you are using Fiddler – in your Unit Test project , you have to manually put them in to the “exception list”.
Open a command line window and check, if your Unit Test project is in the correct isolation level.
CheckNetIsolation Loopbackexempt -s
Add your Unit Test project to the list
CheckNetIsolation Loopbackexempt -a -n=<package familiy name>
You can find your “package familiy name” in the “package.appmanifest” file of your Unit Test project in the Packaging tab.