Re: Cannot instantiate KeyManager (General questions)
Well, that is exactly the point: I am not getting to the point where the key would be loaded. It crashes when it is getting instantiated. The CodeSnippet that I have sent you is my entire code. All the application is doing at the moment is to instantiate the keymanager. Everything else is commented. Locally on my machine, where everything is working as expected I am loading the key on this way:
SFTP _sftp = new SFTP();
_sftp.Blocking = true;
_sftp.ListItemsEvent += new WeOnlyDo.Client.SFTP.ListItemsDelegate(this.sftp1_ListItemsEvent);
_sftp.StateChangedEvent += new WeOnlyDo.Client.SFTP.StateChangedDelegate(this.sftp1_StateChangedEvent);
_sftp.Disposed += new EventHandler(_sftp_Disposed);
_sftp.LoopItemEvent += new SFTP.LoopDelegate(_sftp_LoopItemEvent);
_sftp.AttributesEvent += new SFTP.AttributesDelegate(_sftp_AttributesEvent);
WeOnlyDo.Security.Cryptography.KeyManager KM = new WeOnlyDo.Security.Cryptography.KeyManager();
try
{
_sftp.Port = 22;
_sftp.Timeout = 60;
_sftp.PrivateKey = KM.PrivateKey( KM.Load( PathToKey ) );
_sftp.Hostname = HostIp;
_sftp.Authentication = SFTP.Authentications.PublicKey;
Log.Information( SFTP CONNECTING! );
_sftp.Connect();
}
finally
{
KM = null;
}
Complete thread:
- Cannot instantiate KeyManager - Armin, 2009-03-05, 09:22
- Re: Cannot instantiate KeyManager - woddrazen, 2009-03-05, 10:08
- Re: Cannot instantiate KeyManager - Armin, 2009-03-05, 10:15
- Re: Cannot instantiate KeyManager - woddrazen, 2009-03-05, 10:30
- Re: Cannot instantiate KeyManager - Armin, 2009-03-05, 10:45
- Re: Cannot instantiate KeyManager - woddrazen, 2009-03-05, 13:26
- Re: Cannot instantiate KeyManager - Armin, 2009-03-05, 10:45
- Re: Cannot instantiate KeyManager - woddrazen, 2009-03-05, 10:30
- Re: Cannot instantiate KeyManager - Armin, 2009-03-05, 10:15
- Re: Cannot instantiate KeyManager - woddrazen, 2009-03-05, 10:08