Trying to Connect Web3 to geth on Windows 10

ytriusytrius Member Posts: 26
I have geth.exe running on windows 10 with the parameters "" geth.exe --rpc --rpcaddr "localhost" --rpcport "8545" --rpcapi "web3" --rpccorsdomain "mydomain.net" "" and then in a webpage on "mydomain.net" I set the provider as "web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")). In javascript from that page, I later call web3.version.api, it works. I then call web3.version.node, it also works! However, most calls after that do not work, such as web3.version.network, returns an error. Is there something I'm setting up wrong?

Comments

  • o0ragman0oo0ragman0o Member, Moderator Posts: 1,291 mod
    @plorph What do you get returned with just web3.version?
    > web3.version
    {
    api: "0.13.0",
    client: "Geth/v1.3.6/windows/go1.5.1",
    ethereum: "63",
    network: "1",
    whisper: undefined,
    getClient: function(),
    getEthereum: function(),
    getNetwork: function(),
    getWhisper: function()
    }
Sign In or Register to comment.