Author Topic: .NET Rpc Example [RESOLVED]  (Read 1333 times)

0 Members and 1 Guest are viewing this topic.

Offline kslavik

  • Newbie
  • *
  • Posts: 15
    • View Profile
Problem solved - I was using rpc port instead of httpd_endpoint port

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc

Offline kslavik

  • Newbie
  • *
  • Posts: 15
    • View Profile
Does anybody has an example of the call to BitsharesX client using .NET

I used the following code:
Code: [Select]
using (WebClient pClient = new WebClient()) {
    string    strURL              = "http://user:pass@localhost:65066/rpc"
    string    strRequest       = "{\"method\": \"blockchain_get_block_count\", \"id\": 1 }" 
    return pClient.UploadString(strURL,strRequest);
}

throws the following exception:  "The server committed a protocol violation. Section=ResponseStatusLine"

I did try to use this one:
<httpWebRequest useUnsafeHeaderParsing="true" />
but it didn't help
« Last Edit: August 27, 2014, 09:26:27 pm by bytemaster »