Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running on Windows 11 - onecore\net\netprofiles\service\src\nsp\dll\namespaceserviceprovider.cpp(550)\ #973

Open
vindberg opened this issue Sep 13, 2023 · 4 comments

Comments

@vindberg
Copy link

When running on windows 11. The GetHostByName is deprecated. Only GetHostName is supported as far as I can tell.

Expected Behavior

No console warnings

Current Behavior

Says: onecore\net\netprofiles\service\src\nsp\dll\namespaceserviceprovider.cpp(550)\nlansp_c.dll!00007FFE5424D93D: (caller: 00007FFE6AA6ACF6) LogHr(9) tid(634c) 8007277C No such service is known. The service cannot be found in the specified name space.

when doing a CallAsync()

Possible Solution

Replace GetHostByName with GetHostName - https://stackoverflow.com/a/70978244

Using nugets 4.16 for dotnet core.

@juanfranblanco
Copy link
Member

What is the context of your call, Nethereum does not use that method.

@vindberg
Copy link
Author

Im simply getting the balance of an ERC20 token using the Web3 class of nethereum:

            var erc20Contract = web3.Eth.GetContract(tokenAbi.abi, token.Address);
            var balanceFunction = erc20Contract.GetFunction("balanceOf");
            return await balanceFunction.CallAsync<BigInteger>(address);

Running in debug mode im getting a thread exited with code 0 and the message outlined above.

@juanfranblanco
Copy link
Member

juanfranblanco commented Sep 19, 2023

Just a console application? You may be having an issue with visual studio.

@vindberg
Copy link
Author

Yeah its a hangfire job, but nevertheless it outputs this error when running in debug-mode. Im using Visual Studio.

It it's not your code causing it, then please just close this issue again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants