Invalid state. Not connected - WeOnlyDo Discussion board

Invalid state. Not connected (General questions)

by Ala' Yasin, Thursday, May 19, 2005, 09:13 (7127 days ago)

Hey,

I have the same issue as in topic 1110190746, i try to connect but the status never change to Connected and when I check the log of the SSH server I get the following error:
Service Terminated by exception: sochet bind operation failed with error 10048

and here is the exception I get when I try to call GetFile Method


[code]Invalid state. Not connected.
Stack Trace: at n.ap()
at n.c(String A_0, String A_1)
at WeOnlyDo.Client.SFTP.GetFile(String LocalPath, String RemoteFile)
at DLEngine.Utilities.ClientSFTP.GetAndDeleteFile(String SourceFilePath, String DestinationFilePath)
at DMPImport.DMPImport.GetLenderFiles()[/code]
could you please tell me what's wrong?

Re: Invalid state. Not connected

by wodSupport, Thursday, May 19, 2005, 10:04 (7127 days ago) @ Ala' Yasin

Ala,

I cannot say what's wrong since I don't see your code. I can only guess you didn't set Blocking = True. Is that possible?

Re: Invalid state. Not connected

by Ala, Thursday, May 19, 2005, 10:25 (7127 days ago) @ wodSupport

Ala,

I cannot say what's wrong since I don't see your code. I can only guess you didn't set Blocking = True. Is that possible?

when I set blocking to true the application hangs! is this because i'm using an evaluation package? i already set the tempAuthentication to a valid 30 days trial lisence I got from you

Re: Invalid state. Not connected

by wodSupport, Thursday, May 19, 2005, 10:37 (7127 days ago) @ Ala

Hangs? Where exactly? At Connect?

Since you use it in ASP.NET you most probably have to use blocking mode. Can you paste your code?

Re: Invalid state. Not connected

by Ala, Thursday, May 19, 2005, 10:48 (7127 days ago) @ wodSupport

Ala,

I cannot say what's wrong since I don't see your code. I can only guess you didn't set Blocking = True. Is that possible?

when I set blocking to true the application hangs! is this because i'm using an evaluation package? i already set the tempAuthentication to a valid 30 days trial lisence I got from you

the freeze caused by the fact that setting blocking to true makes all following commands to be performed in synchronous mode. so it should be reset to false after the connection is established. i.e. in connected event.

Re: Invalid state. Not connected

by wodSupport, Thursday, May 19, 2005, 10:51 (7127 days ago) @ Ala

Ala,

you cannot use Blocking AND events. When you set Blocking = True and execute method from within an event, application freezes - you have noticed that.

But if you use ASP.NET then you MUST use Blocking = True, otherwise your page will be returned to the client before wodSFTP manages to connect in the background! Async behavior doesn't suit you now. Do you agree with me?

Re: Invalid state. Not connected

by Ala', Thursday, May 19, 2005, 10:55 (7127 days ago) @ wodSupport

Ala,

you cannot use Blocking AND events. When you set Blocking = True and execute method from within an event, application freezes - you have noticed that.

But if you use ASP.NET then you MUST use Blocking = True, otherwise your page will be returned to the client before wodSFTP manages to connect in the background! Async behavior doesn't suit you now. Do you agree with me?

I do completely agree with you :).
as for blocking you mean that if I removed the Connected event implementation the application won't freeze without resetting blocking to false?

Re: Invalid state. Not connected

by wodSupport, Thursday, May 19, 2005, 11:25 (7127 days ago) @ Ala'

Let's not jump to conclusions here, ok? :)

Can you do some basic tests? Set blocking=true and don't change it back to false no more at all.

Try to connect. Does that work? Now start adding line by line until it stops working - and then let me know where and why and how it doesn't work. Can you do that?