I am using the nethereum package in .Net and trying to invoke a smart contract with web3. Initially it was working fine, but suddenly I am getting an error while trying to get the transaction count. This is the code I am using:
var web3 = new Web3("https://rinkeby.infura.io/"); //getting the error from below line. var txCount = await web3.Eth.Transactions.GetTransactionCount.SendRequestAsync(DefaultAccount, Nethereum.RPC.Eth.DTOs.BlockParameter.CreatePending());
Error occurred when trying to send rpc requests(s) Inner exception: The underlying connection was closed: An unexpected error occurred on a send.
Can anyone help me?