Category Archives: network

number of connections

How many active/open connections can I have in parallel? Six. You can try to open more but they get queued after six (this is transparent to the user and APIs).

Share
Posted in network, wp7 | Leave a comment

Capturing network traffic

How can I capture network traffic for my phone? Use Fiddler, see step by step instructions here

Share
Posted in network, wp7 | Leave a comment

network precedence order

what is the network precedence order when I am debugging/testing an app on the phone? The phone will fall back from Zune -> Wireless -> 3G. Note though, that it will fall through if it can’t connect on each one, … Continue reading

Share
Posted in network, wp7 | Leave a comment

Referrer on HttpWebRequest

I can’t set a “Referrer” header on HttpWebRequest or WebClient. What gives? You can not do it in the RTM release. It is one of the restricted headers.The full list of headers is here. The current workaround is to use … Continue reading

Share
Posted in network, wp7 | Tagged , | Leave a comment

Using basic authentication with WebBrowser control.

How can I pass basic auth credentials to WebBrowser control on Windows Phone?   Try: string hdr = “Authorization: Basic ” + Convert.ToBase64String(Encoding.UTF8.GetBytes(“<username>” + “:” + “<password>”)) + System.Environment.NewLine;webBrowser1.Navigate(new Uri(“http://www.website.com“, UriKind.Absolute), null, hdr);   [note: NTLM is not supported on … Continue reading

Share
Posted in network, wp7 | Tagged , | Leave a comment

inheriting from WebClient leads to System.Exception error

I can instantiate WebClient from my app with no problems. But when I Inherit from it, I get a weird {“The type ‘WindowsPhoneListApplication1.MainPage’, specified in the x:Class of ‘/MainPage.xaml’ could not be found in any loaded assembly.”} System.Exception {System.InvalidOperationException} when … Continue reading

Share
Posted in network, wp7 | Tagged | Leave a comment

Content-Length header is blocked

Content-Length header is one of the restricted headers. How can I download podcasts or other content in chunks? Try using the byte-range header. request = (HttpWebRequest)HttpWebRequest.Create(..); request.Method = “GET”;request.Headers[“Range”] = desiredRange;

Share
Posted in network, wp7 | Tagged , | Leave a comment