I'm in a very odd situation that I've been trying to debug during 4 hours last night. It looks a bit like this unanswered question.
I've developed a snippet on Windows Phone 8 where json data is downloaded.
In my snippet, I'm downloading data from http://api.mtgox.com/api/2/BTCUSD/money/ticker using:
- WebClient
- HttpWebRequest
- WebBrowser (invisible)
- WebClient extension handling cookie
In all four cases, it's working on my emulator. No delay, no timeout, no 403, no 404.
When a friend of mine run this code on his emulator, it seems to time out after 7-8 seconds with TargetInvocationException, and the InnerException contains a NotFound
message. But on his emulator, ANY other website works.
That means that the request is made: GET /api/2/BTCUSD/money/ticker Host: data.mtgox.com Connection: keep-alive etc.
But according to a triple, quadruple, very stubborn verification I did with Wireshark, there is nothing that happens after this get. It's blank. So it timeout.
There is no antivirus or firewall on the PC with the failing request. The page loads fine in a desktop browser. On the emulator, any other json request from other websites work.
So this specific address doesn't work on a specific emulator.
I'm scratching the CCNA knowledge in my head but can't find any reason why a website would refuse to respond to an emulator and accept to respond to another?
Strangely, the snippet on the non-working PC started working in a C# desktop console app after adding a User-Agent, but in his WP emulator, this workaround didn't work in any of the four methods described above. What is crazy is that the sent packet is absolutely identical.