I have setup node in Azure VM (OS Windows) successfully. Below are the commands
geth --rpc --rpcport 8545 --rpcaddr 0.0.0.0 --rpccorsdomain "*" --datadir testprivareDir --port "30303" --nodiscover --rpcapi "db,eth,net,web3" --networkid XXXX
In my code hosted in Azure websites
new Web3.providers.HttpProvider("http://publicIP:8545")); **-- not working**
new Web3.providers.HttpProvider("http://dnsname:8545")); **-- not working**
Note
- I can access it in Remix web3Provider using localhost:8545 inside the VM with the node, but I can't access outside the VM using the public IP (publicIP:8545) or the DNSName:8545
- I have port 30303, 8545, 22,8000, 8080 open in network security group of the VM
- The node is currently mining successfully as well
rpccorsdomain "*", --rpcaddr 0.0.0.0, try also --rpcaddr StaticIP
I am thinking if I can access it in Remix outside the VM with node, it should probably work as well in Azure websites.