login about faq

this snippet of code works on three computers just fine success = sftp.Connect(hostname, port); if (success != true) {

but on one machine the success value is false but the LastErrorText show this

ChilkatLog: IsConnected: DllDate: Dec 29 2015 ChilkatVersion: 9.5.0.55 UnlockPrefix: CARRES.CB41216 Username: V1HOUCRSF01PRD:Administrator Architecture: Little Endian; 32-bit Language: .NET 4.0 VerboseLogging: 1 SftpVersion: 0 --IsConnected --ChilkatLog

asked Jan 14 at 11:01

Mdonnelly314's gravatar image

Mdonnelly314
1


The LastErrorText you are showing is for the IsConnected method. Remember: The LastErrorText contains information for the last method called. If you call Connect, but then call IsConnect prior to getting the contents of LastErrorText, then you'll be looking at the LastErrorText for the IsConnect method...

link

answered Jan 14 at 11:04

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

this is the first attempt at connecting I am trying to determine why the success value is false on this computer and true on another computer

method that is reporting false

success = sftp.Connect(hostname, port); if (success != true) { if (IsDebugMode) { MessageBox.Show(sftp.LastErrorText); } else {

                        string sl = sftp.SessionLog;

                        _Framework.fwAddError(clsFramework.clsLogging.enumErrorSeverity.High, "", "sftp.Connect", "Unable to Connect to Autoloop SFTP server", "URL = " + hostname.ToString());
                    }

                    WriteStatusUpdates(LogServerName, ProcessStartTime, "Not able to Connect to FTP Server");
                    return -1;
                }
link

answered Jan 14 at 11:15

Mdonnelly314's gravatar image

Mdonnelly314
1

Look at the contents of the LastErrorText for the Connect method call. Also, be aware the displaying the LastErrorText in a MessageBox will probably result in truncating the contents. You'll want to see all of it.

link

answered Jan 14 at 11:19

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Maybe I am dense here but since I have the sftp.LastErrorText after the sftp.Connect is set to false wouldn't that show me the LastErrortext for the Connect method

link

answered Jan 14 at 11:35

Mdonnelly314's gravatar image

Mdonnelly314
1

when this executes how can I see what the caused the connect to be false

link

answered Jan 14 at 11:37

Mdonnelly314's gravatar image

Mdonnelly314
1

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×200

Asked: Jan 14 at 11:01

Seen: 483 times

Last updated: Jan 14 at 11:37

powered by OSQA