HttpWebRequest.GetResponse() hangs on G120 when provided invalid url

Hi.

Our G120 (.Net mf 4.2) hangs when I run HttpWebRequest.GetResponse() with an invalid url (server is down). I have set the timeout property without any effect.

Is this perhaps related to the following issue: https://www.ghielectronics.com/community/forum/topic?id=9507 ?

If so, does anyone know about any workaround?

I saw someone use ExecutionConstraint.Install(timeout, 0). I am not sure you can use or not.

I tried this tonight and it seemed to do it. I will let it run for a few days but before this I could cause the device to hang on demand by blocking the outbound connection to cosm/xively at my firewall.

Thank you! This has been causing me a lot of grief.

I have tried the solution with ExecutionConstraint.Install() and it solves the problem and does not seem to cause any side effects. Thank you!