Sometimes I get the following error while I was doing HttpWebRequest to a WebService. I copied my code below too.
System.Net.WebException: Unable to connect
Go to your WCF project - properties -> -> debuggers -> unmark the checkbox
Enable Edit and Continue