Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Chilkat

Pages: 1 ... 5 6 [7]
91
FTP / Re: FTP2 - How to set Default Remote Directory?
« on: November 06, 2017, 08:58:13 AM »
Here are some comments:

1) The error "Not connected to an FTP server.  The connection was previously lost, or it was never established." indicates that something failed prior to this method call.  You want to find out which prior method call failed (which is where the connection was lost), and then examine the LastErrorText for that method call.

2) The method that likely failed was the call to GetDirCount (which is why I posted above a reply explaining GetDirCount in more detail.)

3) Your code is calling GetDirCount with the assumption that it never fails.  In fact, GetDirCount is the most internally complex call in your code snippet because it is downloading the directory listing from the FTP server, and that requires a separate data connection.  The most likely cause of the failure is that the data connection was blocked by a firewall.  See http://cknotes.com/determining-ftp2-connection-settings/

4) I always look to see if the user's code snippet matches the claimed output/log.   For example, your output shows "Information: 0x0 at FTP TEST: FTPS Channel Established!", but I never actually see a line of code in your snippet that produces that output line, so I question whether the code snippet you're showing is what actually produced the given output..

5) I notice this line in your output:  "Information: 0x0 at FTP TEST: Folders:-1"  which clearly shows the call to GetDirCount failed.  That's the problem that needs to be solved.  Any error downstream *after* the connection was already lost is irrelevant..

92
FTP / Re: FTP2 - How to set Default Remote Directory?
« on: November 06, 2017, 08:49:08 AM »
Thanks Patrick,

I wrote this recently in response to another post, and I think it's important here:
(I'll post another response, but please read this first...)

Quote
I think some clarification is all that's needed.

The referenced example calls GetDirCount, and then loops over the directory entries, calling GetFilename, GetSize, etc.    The call to GetDirCount fetches (downloads) the directory listing from the FTP server.  The calls to GetFilename, GetSize, etc. are simply returning information from the already-downloaded (cached) directory listing.  Therefore, there is no need for async methods for GetFilename, GetSize, etc. because those methods don't communicate with the FTP server.

It is the GetDirCount method that potentially communicates with the FTP server to download the directory listing, and it has a corresponding GetDirCountAsync method.  In fact, any method in any Chilkat class that communicates over the Internet will automatically have a corresponding Async method.  If no Async method exists, such as for GetFilename, then you'll know that it does not communicate over the Internet.

The GetDirCount method will only fetch a new directory listing if the cached copy is not fresh.  For example, if your application changes the current remote directory, then the cache is no longer fresh and the next call to GetDirCount will fetch the new directory listing.  Also, if you change the ListPattern property, then the next call to GetDirCount will re-fetch.     To clarify further: Let's say the directory cache is not fresh (or has never been downloaded) and you call GetDirCount two times in a row.  The 1st call will fetch the directory listing and return the count.  The 2nd call will find a valid cached directory listing and simply return the count.

93
General Discussion / MOVED: Clearing an E-mail
« on: November 03, 2017, 12:43:52 PM »

94
Solaris / Re: Solaris SPARC support
« on: November 02, 2017, 10:12:33 AM »
Thanks.  Unfortunately, SPARC is no longer supported. 

95
C / C++ / Re: VC 7.1 undefined symbols: SfxConfig, ClsCsp
« on: November 02, 2017, 10:11:47 AM »
This will be fixed in the next version of Chilkat released near the end of this month.   

96
FTP / Re: FTP2 - How to set Default Remote Directory?
« on: November 02, 2017, 10:08:27 AM »
I notice that quite often, a programmer is faced with a problem and doesn't know what to do.  The way to approach any problem, is to first ask "What information is available that will shed light on the cause of the problem?"
  The way to answer this question is to browse the documentation and online examples with that question in mind.

With Chilkat, the answer is always this:  First look at the contents of the LastErrorText property of the object instance for the method call that either failed or didn't behave as expected. 

In the FTP case, there is also the SessionLog, but you'll have to make sure to turn on the KeepSessionLog property to get it.

Finally, if a question is posted with no information other than "it failed", then nobody can really help.  If somebody's kind-hearted, they might suggest posting the contents of the LastErrorText, or ask politely for more information.  But a person with general problem-solving skills would've already found the information.  If that information didn't immediately solve the problem, he/she/... would post the information to make it possible for someone to help...


97
FTP / Re: Async methods for FTP GetFilename, GetSize, etc.?
« on: November 02, 2017, 09:51:02 AM »
I think some clarification is all that's needed.

The referenced example calls GetDirCount, and then loops over the directory entries, calling GetFilename, GetSize, etc.    The call to GetDirCount fetches (downloads) the directory listing from the FTP server.  The calls to GetFilename, GetSize, etc. are simply returning information from the already-downloaded (cached) directory listing.  Therefore, there is no need for async methods for GetFilename, GetSize, etc. because those methods don't communicate with the FTP server.

It is the GetDirCount method that potentially communicates with the FTP server to download the directory listing, and it has a corresponding GetDirCountAsync method.  In fact, any method in any Chilkat class that communicates over the Internet will automatically have a corresponding Async method.  If no Async method exists, such as for GetFilename, then you'll know that it does not communicate over the Internet.

The GetDirCount method will only fetch a new directory listing if the cached copy is not fresh.  For example, if your application changes the current remote directory, then the cache is no longer fresh and the next call to GetDirCount will fetch the new directory listing.  Also, if you change the ListPattern property, then the next call to GetDirCount will re-fetch.     To clarify further: Let's say the directory cache is not fresh (or has never been downloaded) and you call GetDirCount two times in a row.  The 1st call will fetch the directory listing and return the count.  The 2nd call will find a valid cached directory listing and simply return the count.



98
FTP / Async methods for FTP GetFilename, GetSize, etc.?
« on: November 02, 2017, 09:37:16 AM »
Quick question please. I want to get the contents information of a directory asynchronously (FTP object). From what Iíve seen in your documentation you have the method GetFilename, GetSize, etc (https://www.example-code.com/objc/ftp_listDirectory.asp). I was wondering if you could suggest a way to get the fileName, size, isDirectory (Yes or No) and the itemPermission asynchronously.

99
Email Protocols / Re: Bounce Email
« on: November 02, 2017, 09:33:49 AM »
This sounds like a support question that should be sent to support@chilkatsoft.com.  If you are licensed and your support hasn't expired, then Chilkat will promptly assist you..

100
The answer is Yes to all.

Chilkat provides the ability to use HTTP or SOCKS proxies with either POP3 or SMTP.

101
General Discussion / Welcome to the New Chilkat Forum
« on: October 28, 2017, 12:06:35 PM »
The old Chilkat forum at http://www.chilkatforum.com/   is closed for new membership and new posts.  This forum will take its place..

Pages: 1 ... 5 6 [7]