Author

Topic: 0.25 BTC Rewards! Build a simple C# aspx withdraw form page. (Read 639 times)

sr. member
Activity: 322
Merit: 250
Are you still looking for this job to be done ?? contact me via pm !!
full member
Activity: 175
Merit: 100
Skype: tfctree
sr. member
Activity: 252
Merit: 250
Live Stars - Adult Streaming Platform
Updating reward to .5 BTC
sr. member
Activity: 252
Merit: 250
Live Stars - Adult Streaming Platform
Hi,

I have a windows server running bitcoin and i need a simple aspx page to display balance and withdraw.

Example:
Code:
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create("http://localhost.:8332");
 webRequest.Credentials = new NetworkCredential("user", "pwd");
 /// important, otherwise the service can't desirialse your request properly
 webRequest.ContentType = "application/json-rpc";
 webRequest.Method = "POST";
 
 JObject joe = new JObject();
 joe.Add(new JProperty("jsonrpc", "1.0"));
 joe.Add(new JProperty("id", "1"));
 joe.Add(new JProperty("method", Method));
 // params is a collection values which the method requires..
 if (Params.Keys.Count == 0)
 {
  joe.Add(new JProperty("params", new JArray()));
 }
 else
 {
     JArray props = new JArray();
     // add the props in the reverse order!
     for (int i = Params.Keys.Count - 1; i >= 0; i--)
     {
        .... // add the params
     }
     joe.Add(new JProperty("params", props));
     }
 
     // serialize json for the request
     string s = JsonConvert.SerializeObject(joe);
     byte[] byteArray = Encoding.UTF8.GetBytes(s);
     webRequest.ContentLength = byteArray.Length;
     Stream dataStream = webRequest.GetRequestStream();
     dataStream.Write(byteArray, 0, byteArray.Length);
     dataStream.Close();
 
 
     WebResponse webResponse = webRequest.GetResponse();
 
     ... // deserialze the response

Related links:

http://api-portal.anypoint.mulesoft.com/bitcoin-project/api/bitcoin-api/docs/auth-security
https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)

A example of the page needed:

Jump to: