I'm trying to make a web request to Apple's itunes xml server and receive the XML - using this code (very simplified):
string url = "http://ax.phobos.apple.com.edgesuite.net/WebObjects/ MZStore.woa/wa/viewSoftware?id=303491209"; WebRequest requestHtml = WebRequest.Create(url); WebResponse responseHtml = requestHtml.GetResponse(); // Read the text from the response stream. using (StreamReader r = new StreamReader(responseHtml.GetResponseStream ())) { Response.Write(r.ReadToEnd()); } When I open the url in firefox: http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/viewSoftware?id=303491209 I get a properly formatted XML document displayed When I run the code above in a .NET 3.* website test app I get output that looks something like this "��=�r�8���...@in�zflq��dii);�Ӟ�� �ئ6/]����$HJ��8n9����7,��_��x�E�Q��l5q jZ�l��|y�����;&��CF �6ތ��15�q�Ԙ��Z�����um�4�B����7����Q���m�ڃAM=z�s�G ������A͈��$?k���к �ѡ�]Z ��z|�݅��{�ܣ5�=�����q���=�2��$� $�H����7�a�Y�:;��'���S���꾯�S?t�7���z[������q�|� 2���� {���pe��d?�s��� ڝ��g�pu �^H�ټ7�}3;�E�mz��c�v��g#����)���M+`D� ��_����b>�|��$�i�Q�������]���e���P��$���y5����O?��|�3�'���k? �`vS����,���$�$��dh���9̥" It seems there is a problem with the encoding or something? I'm not sure... any help would be greatly appreciated.
