I'm trying to setup a simple http request to stratum mining pool in c#. I'm getting this error: "Underlaying connection was closed."
Code:
string json = "{\"method\": \"getblocktemplate\", \"params\": [], \"id\": \"0\"}";
WebClient w = new WebClient();
w.Credentials = new NetworkCredential("user", "pass");
w.Headers.Add("Content-type", "application/stratum");
j = wc.UploadString("http://blabla.com:3333", json);
Please help