Post
Topic
Board Pools
Re: [ANN] Stratum mining protocol - ASIC ready
by
Luke-Jr
on 09/03/2014, 17:54:06 UTC
Hi guys

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
This thread is for the stratum mining protocol, but you seem to be trying to use GBT (with the wrong Content-type, and apparently connecting to a stratum host...)
GBT and stratum are not compatible.