0

I'm working with ASP.NET Core project and wanted to connect Blockchain with it. But the problem is, we don't want to use Web3 npm packages. Hence, I have added web3 js as follows

<script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js/dist/web3.min.js"></script> 

Now, I'm trying to set Web3 provider (Ganache Server URL) as follows,

const web3 = new Web3("HTTP://127.0.0.1:7545");

But It gives an error of Uncaught ReferenceError: Web3 is not defined

Is there any thing need to add in the above steps?

  • Ganache is unrelated of this problem. You can remove the corresponding tag and change the title accordingly. – goodvibration Sep 16 at 8:29
  • Thanks! @goodvibration, updated. – Div Sep 16 at 8:34
1

You don't need to use npm to work with web3 in .Net based project. You can use nethereum

  • Thanks! @jadd22 – Div Sep 25 at 6:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.