title: when trying to connect to IPFS System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it
body: <p>I am trying to upload a file to Ipfs below is my code sample.</p>
  <pre><code>using (var ipfs = new IpfsClient())
                  {
                      await ipfs.Swarm.Peers();
                      IpfsStream inputStream = new IpfsStream(filepath, System.IO.File.OpenRead(filepath));
                      MerkleNode node = await ipfs.Add(inputStream);
                      return Ok(node.Hash);
                  }
  </code></pre>
  <p>and i am getting error
  <strong>System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it.
  ---&gt; System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.
  at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)</strong></p>
  <p>Any reasons my firewall is turned off so that cant be an issue. Any suggestions.</p>
  <p>Is it correct approach to write file on ipfs.</p>