is WeOnlyDo.Security.Cwwryptography.KeyManager com (General questions)
Hi, there,
I am trying to create a component based on sftp and key manager for my asp page. However, I got this error:
error '80070002'
Could not load file or assembly 'WeOnlyDo.Security.Cryptography.KeyManager, Version=1.0.1.10, Culture=neutral, PublicKeyToken=900ddd6a51580424' or one of its dependencies. The system cannot find the file specified.
Does anybody know what might cause this error? I have tried to put keymanager into gac and run regasm to register it, no error when I did so, but I still got the same error after it.
Any help would be appreciate.
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Hi Lily,
What version of NET framework do you have?
Can you please remove wodSFTP.NET and WeOnlyDo.Security.Cryptography.KeyManager from gac (gacutil -u) and download and update your version of wodSFTP.NET package (and wodKeyManager inside) to current?
Link where you can find it is:
http://www.weonlydo.com/index.asp?showform=SFTP.NET
Let us know how it goes.
Regards,
Drazen
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
I have tried the newest version, however,it becomes worse, I got the error even running from a .net console application. The same error message:
Could not load file or assembly 'WeOnlyDo.Client.SFTP, Version=2.0.1.8, Culture=neutral, PublicKeyToken=305e8ab915f4f7a3' or one of its dependencies. The system cannot find the file specified.
Thanks for your help in advance.
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
By the way, could you tell me which .net version is this newest version based on?
and also the previous version wodSFTP.NET 2.0.1.8?
Thanks.
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Lily,
what version of NET framework are you using?
Kreso
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
2.0
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
vs.net 2005 as the IDE
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Hi Lily,
You can try on this way remove reference for wodSFTP.NET from your project, close VS. Delete bin and obj folders.
Uninstall wodSFTP.NET and then run gacutil -u for wodSFTP.NET and WeOnlyDo.Security.Cryptography.KeyManager also you can try remove from your hard disk all WeOnlyDo.Security.Cryptography.KeyManager.dll and WeOnyDo.Client.SFTP.dll files.
After that you can try install new version of wodSFTP.NET component.
You can request register version from this page:
http://www.weonlydo.com/index.asp?update=1
This is automated process. Make sure you use same email address that is registered with our system, one you used when you have purchased the product.
Newest version for wodSFTP.NET component is 3.0.4
Hope I helped.
Regards,
Drazen
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Lily,
you can also try one other thing. wodSFTP.NET was compiled in VS2003 (NET1.1) but noone yet complained about such error you experience.
However, wodFtpDLX.NET
http://www.weonlydo.com/index.asp?showform=FtpDLX.NET
was written in VS2005 (NET2.0). Can you try to use wodFtpDLX.NET? It has same set of methods/properties/events as wodSFTP.NET does, perhaps it will solve your problem?
If you're licensed user, then I can recompile wodSFTP.NET in NET2.0 for you, if you wish.
Kreso
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Hi Lily,
You can try on this way remove reference for wodSFTP.NET from your project, close VS. Delete bin and obj folders.
Uninstall wodSFTP.NET and then run gacutil -u for wodSFTP.NET and WeOnlyDo.Security.Cryptography.KeyManager also you can try remove from your hard disk all WeOnlyDo.Security.Cryptography.KeyManager.dll and WeOnyDo.Client.SFTP.dll files.After that you can try install new version of wodSFTP.NET component.
You can request register version from this page:http://www.weonlydo.com/index.asp?update=1
This is automated process. Make sure you use same email address that is registered with our system, one you used when you have purchased the product.
Newest version for wodSFTP.NET component is 3.0.4
Hope I helped.
Regards,
Drazen
Thanks for you help. Now it works in .net, and when I try it in asp, it just cannot connect to the server, I am wondering if it is because of it is a trial version.
Is it free to upgrade my old version 2 to this version? Thanks.
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Hi Lily,
If you are licensed user you can request update for new version on that page(http://www.weonlydo.com/index.asp?update=1 ) and use e-mail that you used when you purchase component.
License Key is same as in old version and you can always request update for new version this is how we works.
What was error that you get when using ASP maybe we can help you (trial version is same as licensed only difference is 30 days period for evaluating).
Drazen
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Hi Lily,
If you are licensed user you can request update for new version on that page(http://www.weonlydo.com/index.asp?update=1 ) and use e-mail that you used when you purchase component.
License Key is same as in old version and you can always request update for new version this is how we works.What was error that you get when using ASP maybe we can help you (trial version is same as licensed only difference is 30 days period for evaluating).
Drazen
Drazen,
Thank you very much. The error is: WeOnlyDo.Exceptions.SFTP.LicenseInvalidException: Could not read licensing data (unable to access the registry, running as guest user?). Please contact sales@weonlydo.com to obtain temporary license key.
So, it is a licensing issue. I will ask my manager to get updated license number.
Thanks for your help.
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Lily
Please send e-mail to sales@weonlydo.com and we will send you Temporary License Key and you will get with that key 30 days of evaluation period in ASP.NET.
Drazen
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Lily
Please send e-mail to sales@weonlydo.com and we will send you Temporary License Key and you will get with that key 30 days of evaluation period in ASP.NET.
Drazen
Thanks Drazen,
I have sent the email to sales@weonlydo.com and request a temp License Key. I will see if it will work.
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Lily,
you can also try one other thing. wodSFTP.NET was compiled in VS2003 (NET1.1) but noone yet complained about such error you experience.
However, wodFtpDLX.NET
http://www.weonlydo.com/index.asp?showform=FtpDLX.NET
was written in VS2005 (NET2.0). Can you try to use wodFtpDLX.NET? It has same set of methods/properties/events as wodSFTP.NET does, perhaps it will solve your problem?
If you're licensed user, then I can recompile wodSFTP.NET in NET2.0 for you, if you wish.
Kreso
Hi, Kreso,
Sorry, I missed your posting. Thank you very much for the info. Could you tell me what is the difference between those two components?
We have wodSFTP.NET license now, but we are considering buying more licenses, if FtpDLX.NET is a better option, we might consider to switch to it. However, the sample doesn't include the authentication with public key. I use keyManager for wodSFTP.NET, but FtpDLX.NET seems don't need keyManager.
Is there a sample for this purpose?
Thanks in advance.
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Hi Lily,
As Kreso mention WodFtpDLX.NET component was written VS2005 (NET2.0) and you told us that you use NET 2.0 Framework so you can use it.
With WodFtpDLX component you can do everything what you can do with wodSFTP.NET component and there is more feature like different protocol type wodSFTP.NET support just SFTP protocol with WodFtpDLX.NET you can access also FTP protocol and secure FTPS(FTP+SSL).
It has same set of methods/properties/events as wodSFTP.NET and price is slightly higher then wodSFTP.NET for 20$.
You can download it and try it on this page:
http://www.weonlydo.com/index.asp?showform=FtpDLX.NET
Drazen
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Hi Lily,
As Kreso mention WodFtpDLX.NET component was written VS2005 (NET2.0) and you told us that you use NET 2.0 Framework so you can use it.With WodFtpDLX component you can do everything what you can do with wodSFTP.NET component and there is more feature like different protocol type wodSFTP.NET support just SFTP protocol with WodFtpDLX.NET you can access also FTP protocol and secure FTPS(FTP+SSL).
It has same set of methods/properties/events as wodSFTP.NET and price is slightly higher then wodSFTP.NET for 20$.
You can download it and try it on this page:
http://www.weonlydo.com/index.asp?showform=FtpDLX.NET
Drazen
Thank you Drazen, do you have sample code for how to load a key in FTPDLX for public key authentication?
Thanks in advance.
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Lily,
Here is sample in VB6 how to connect to server with PrivateKey (server must have your public key in that case) using wodFtpDLX component.
----------------
Dim dlx1 As New wodFtpDLXCom
Dim cert As New Certificate
Set dlx1.Certificate = cert
cert.LoadKey App.Path & private.txt
dlx1.HostName = your_hostname
dlx1.Authentication = authCertificate
dlx1.Login = your_login
dlx1.Protocol = SFTP
dlx1.Connect
----------------
Hope I helped.
Drazen
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Lily,
Here is sample in VB6 how to connect to server with PrivateKey (server must have your public key in that case) using wodFtpDLX component.----------------
Dim dlx1 As New wodFtpDLXCom
Dim cert As New Certificate
Set dlx1.Certificate = certcert.LoadKey App.Path & private.txt
dlx1.HostName = your_hostname
dlx1.Authentication = authCertificate
dlx1.Login = your_login
dlx1.Protocol = SFTP
dlx1.Connect
----------------Hope I helped.
Drazen
Thank you Drazen, however, the wodFTPDLX.net doesn't have wodFtpDLXCom and certificate. Are you saying for wodFTPDLX.net, I can access it directly from an asp page to treat it as a com component?
What I am doing now, is to use the wodFTPDLX.net to create my own com component, and use it from my ASP page. So far, I have got wodSFTP.net(3.0.4) worked with a temp license, however, since somebody recommended the wodFTPDLX.net to me, I thought this one is more powerful, so I am thinking of use this one instead of the SFTP, but I cannot get this one work since I cannot find out how to get the private key load with this one. I used keyManager, it didn't work. Would you kindly show me the code of how to use public authentication to work? Thank you very much in advance.
Lily
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Well, I tried this. This is not easy, we have to figure out way to make things easier. Until we sort it out, we need small help of wodSFTP.NET but only once, and you don't need it in your application anymore.
Here's what you need to do:
1. Generate key. For example, RSA, like this:[code]System.Security.Cryptography.RSACryptoServiceProvider rsa = new System.Security.Cryptography.RSACryptoServiceProvider();[/code]By default, when you initialize RSACryptoServiceProvider it generates new key so nothing more needs to be done here. I will just use it's output from rsa.ToXmlString function (too long to paste here). You could also save output of rsa.ToXmlString somewhere since that is your key you will reuse later on!!!
2. Get its public key out in OpenSSH format. This is only tricky part - you must upload this public key to the server. Since wodFtpDLX at this point can't help you with this, you can use wodSFTP.NET's wodKeyManager, like this:[code]WeOnlyDo.Security.Cryptography.KeyManager km = new WeOnlyDo.Security.Cryptography.KeyManager();
km.FromXmlString(rsa.ToXmlString());
Console.Write(km.PublicKeyOpenSSH(WeOnlyDo.Security.Cryptography.SSHKeyTypes.RSAKey));[/code]YOU NEED TO DO THIS ONLY ONCE, so you don't need wodKeyManager in the future. You must paste this public key dumped on the screen to appropriate place on your server (usually ~/.ssh/authorized_keys2 file). It's same with wodSFTP.NET, so wodFtpDLX.NET isn't any more complex than the other one (or any other client, for that sake).
3. You generated the key, you pasted it's public key part - now use it with wodFtpDLX.NET:[code]System.Security.Cryptography.RSACryptoServiceProvider rsa = new System.Security.Cryptography.RSACryptoServiceProvider();
rsa.FromXmlString( ...xml string from step 1... );
Ftp1.PrivateKey = rsa;
Ftp1.Authentication = Authentications.PublicKey;[/code]
That's it. Hope it helped!
Kreso
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Done! wodFtpDLX now has PublicKeySSH and PublicKeyOpenSSH properties to extract public key from the PrivateKey property. Now you can skip step 2 and usage of wodKeyManager, and do this instead in step 2:[code]Ftp1.PrivateKey = <RSAKeyValue>.....data goes here</RSAKeyValue> ;
Console.Write(Ftp1.PublicKeyOpenSSH);[/code]
Kreso
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Done! wodFtpDLX now has PublicKeySSH and PublicKeyOpenSSH properties to extract public key from the PrivateKey property. Now you can skip step 2 and usage of wodKeyManager, and do this instead in step 2:[code]Ftp1.PrivateKey = <RSAKeyValue>.....data goes here</RSAKeyValue> ;
Console.Write(Ftp1.PublicKeyOpenSSH);[/code]Kreso
Kreso,
Thank you very much. It's my fault. I didn't describe my request clear. I already got the private key, and the public key has been put on server (Sys admin did that). So, what I want to know is how to get wodFtpDLX to work with it (using private key file to connect to the server).
1) How to load the private key file to my program
2) Which property I should assign it to to get wodFtpDLX to connect to the server (I guess it is privatekey property, but not sure.)
Thank you very much for your patience. WOD tech support really impressed me.
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Lily,
in what format is your private key? How did you create it?
Kreso
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Lily,
in what format is your private key? How did you create it?
Kreso
Hi, Kreso,
It is an OpenSSH, 1024-bit dsa-key, which I believe created by puttygen.exe.
Lily
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Unfortunatelly, I don't have nice and clean answer for that.
You will need to do this once only:
1. use wodKeyManager from wodSFTP.NET or wodSSH.NET
2. do wodKeyManager.Load to load that key
3. do wodKeyManager.ToXmlString to export to XML
now you have XML you can use with wodFtpDLX.NET .
Sorry for these steps, but with wodFtpDLX.NET we tried to migrate fully to NET framework functions, and seems it doesn't have nice way to import OpenSSH keys.
Kreso
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Unfortunatelly, I don't have nice and clean answer for that.
You will need to do this once only:
1. use wodKeyManager from wodSFTP.NET or wodSSH.NET
2. do wodKeyManager.Load to load that key
3. do wodKeyManager.ToXmlString to export to XMLnow you have XML you can use with wodFtpDLX.NET .
Sorry for these steps, but with wodFtpDLX.NET we tried to migrate fully to NET framework functions, and seems it doesn't have nice way to import OpenSSH keys.
Kreso
Hi, Kreso,
I have tried to do the way you told me like the following:
kt = km.Load(_PrivateKey, _Passphrase);
wodftpdlx1.PrivateKey = km.ToXmlString(kt, true);
I also tried:
kt = km.Load(_PrivateKey, _Passphrase);
wodftpdlx1.PrivateKey = km.ToXmlString(kt, false);
Both didn't work. It didn't give error message when compile, however, the connection failed due to authentication - I assume it is because of the privatekey value is not in the correct format.
Could you tell me what's wrong? Thank you in advance.
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Lily,
if wodKeyManager didn't report an error, and if wodFtpDLX.NET didn't report key-related errors, then key is correct (in terms of RSA architecture).
Possible problem now is that you didn't upload public key to the server to correct file. Did you?
Kreso
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Lily,
if wodKeyManager didn't report an error, and if wodFtpDLX.NET didn't report key-related errors, then key is correct (in terms of RSA architecture).
Possible problem now is that you didn't upload public key to the server to correct file. Did you?
Kreso
Kreso,
I have used the same key in your sftp.net component, and everything works without any problem. but when I use wodSFtpDLX.net, I got the error. By the way, the key is not RSA, but DSA format.
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Lily,
I'm clueless - I'm quite sure this should work. I need some way to duplicate this. Can you send me that key overhere?
Kreso
Re: is WeOnlyDo.Security.Cwwryptography.KeyManager
Lily,
I'm clueless - I'm quite sure this should work. I need some way to duplicate this. Can you send me that key overhere?
Kreso
Hi, Kreso,
Thank you, I just send the keys to - techsupport@weonlydo.com - the Ticket ID: 44450AE6
The sever information is sent at ticket ID 44450B23.