Could not load file or assembly 'WeOnlyDo.Security.Crypto... - WeOnlyDo Discussion board

Could not load file or assembly 'WeOnlyDo.Security.Crypto... (wodSSH / wodSSH.NET)

by madmaats, Monday, August 17, 2015, 21:07 (3168 days ago)

Hi,

I'm getting this error on the server where the code should be hosted: Could not load file or assembly 'WeOnlyDo.Security.Cryptography.KeyManager.dll' or one of its dependencies...

The code works fine on my dev environment, but not on the server where it should be hosted.

I have now created a very simple console app with this code to make sure nothing else is the problem:
Console.WriteLine("Start");
Console.ReadLine();
WeOnlyDo.Security.Cryptography.KeyManager km = new WeOnlyDo.Security.Cryptography.KeyManager();
Console.WriteLine("End");
Console.ReadLine();

I have tried both the 64bit and the 32 bit version (compiled with x64 and x86), but I get the same error all the time on the server.
It works perfectly fine on my dev machine.

I'm using the .net 4 version of WeOnlyDo.Security.Cryptography.KeyManager.dll (and compiling it for .net 4.

When testing the .net 2 version and compiling it for .net 2 it works fine. Both x86 and x64.
Unfortunately I can't use .net 2 for my project, so this is not an option.

Must be some dependency missing for the .net 4 version on the server. What dependencies does the WeOnlyDo.Security.Cryptography.KeyManager have?

/Mats

Could not load file or assembly 'WeOnlyDo.Security.Crypto...

by Jasmine, Monday, August 17, 2015, 21:10 (3168 days ago) @ madmaats

Hi Mats.

You can check by yourself what dependencies wodKeyManager have - most probably this is MSVCRTxxx.dll. You can download 'depends.exe'

http://www.dependencywalker.com/

and see what are requirements, and what is missing. Can you try that, and if it doesn't help we'll proceed from there?

Kind regards,
Jasmine.

Could not load file or assembly 'WeOnlyDo.Security.Crypto...

by madmaats, Monday, August 17, 2015, 21:54 (3168 days ago) @ Jasmine

Hi,

As you said, it was missing the MSVCRTxxx.dll. Thanks!

I installed the Microsoft Visual C++ 2010 Redistributable Package (x64) and that solved it (it didn't work just to copy the file from my machine).

Another question: To verify the connection to the host I'm supposed to connect to, I have created a simple terminal application (took your sample and added private key).
I manage to connect to the host and receive a text, but then I get disconnected. Do you know if it could be a firewall problem on our side (if that is a common problem) or is it just the other host that disconnects?

As usual it works fine on my machine :)

/Mats

Could not load file or assembly 'WeOnlyDo.Security.Crypto...

by Jasmine, Monday, August 17, 2015, 21:59 (3168 days ago) @ madmaats

Hi Mats.

I doubt it's firewall issue.

What code do you have after Connect? Do you use Blocking = true? I don't know what kind of app you're using, so I can't give you more details on what could be going on.

But if you're connected, then all should be fine as far as SSH is concerned.

Jasmine.