Hi Chris,
Added a couple of Debug.Print statements
{
//request.Proxy = proxy;
request.Method = "GET";
request.ContentType = "text/html; charset=utf-8";
request.KeepAlive = false;
Debug.Print("request.GetResponse() Before");
using (var response = (HttpWebResponse)request.GetResponse())
{
Debug.Print("HTTP Status:" + response.StatusCode + " : " + response.StatusDescription);
}
Debug.Print("request.GetResponse() After");
}
First I unplug the cable
request.GetResponse() Before
HTTP Status:200 : OK
request.GetResponse() After
request.GetResponse() Before
HTTP Status:200 : OK
request.GetResponse() After
request.GetResponse() Before
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Netduino.IP.LinkLayers.CC3100
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
request.GetResponse() Before
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Netduino.IP.LinkLayers.CC3100
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
request.GetResponse() Before
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Netduino.IP.LinkLayers.CC3100
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
request.GetResponse() Before
HTTP Status:200 : OK
request.GetResponse() After
request.GetResponse() Before
HTTP Status:200 : OK
request.GetResponse() After
request.GetResponse() Before
HTTP Status:200 : OK
Cable plugged back in and requests resumed.
Then I turn off the router
request.GetResponse() Before
HTTP Status:200 : OK
request.GetResponse() After
request.GetResponse() Before
HTTP Status:200 : OK
request.GetResponse() After
request.GetResponse() Before
HTTP Status:200 : OK
request.GetResponse() After
request.GetResponse() Before
NetworkChange_NetworkAvailabilityChanged False
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Netduino.IP.LinkLayers.CC3100
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
request.GetResponse() Before
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Netduino.IP.LinkLayers.CC3100
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
request.GetResponse() Before
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Netduino.IP.LinkLayers.CC3100
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
request.GetResponse() Before
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Netduino.IP.LinkLayers.CC3100
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
request.GetResponse() Before
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Netduino.IP.LinkLayers.CC3100
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
request.GetResponse() Before
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Netduino.IP.LinkLayers.CC3100
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
request.GetResponse() Before
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Netduino.IP.LinkLayers.CC3100
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
NetworkChange_NetworkAvailabilityChanged True
request.GetResponse() Before
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Netduino.IP.LinkLayers.CC3100
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
A first chance exception of type 'System.Net.WebException' occurred in System.Http.dll
request.GetResponse() Before
From the logging it looks like it hangs up in the var response = (HttpWebResponse)request.GetResponse()) on the second request after connectivity restored.
I'll do some more digging and create an issue this evening when I get home from work
@KiwiBryn
blog.devmobile.co.nz