Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component

Index of Chilkat Blog Posts

December 20, 2006

Designing Components for Future Problems

The Chilkat components are designed with features that help diagnose and quickly fix problems as they may occur in the future. The Chilkat components communicate with many types of servers: FTP, IMAP, POP3, SMTP, etc., and over the span of years it is not unreasonable to believe that new vendors of servers will come into existence, and those new servers may not be 100% perfect.

Each object/class includes three standard last-error properties (LastErrorText, LastErrorHtml, LastErrorXml) and a SaveLastError method. The LastError* properties provide the developer with detailed information about what happened during the last method call. It will contain information even when the method succeeds, as this allows the programmer to verify that a particular operation happened as expected. For example, when sending a signed email with a specific SMTP authentication method over SSL, was the correct certificate used? Was the SMTP authentication as expected? Did the connection actually occur over SSL? These questions can be verified by reviewing the LastErrorText. The SaveLastError method saves the last-error information to an XML-formatted file.

The intent of the last-error information is to provide the developer answers to the first few questions that would be asked for any given type of failure. For example, if you get a "file not found" or "cannot open file" or "cannot create file", you’ll want to know these things: (1) What is my current working directory? (2) What was the filepath being opened? (3) What is my logged-on username? (4) Why did it fail?

Usually, seeing the last-error information makes it easy to understand and resolve a problem.

Some components provide properties to review the exact responses received from a server. The IMAP component provides a LastResponse property which will contain the last raw response received from the IMAP server after any method call. This information can be passed to Chilkat support to help resolve a problem. Likewise, the FTP component includes a SessionLog property (which needs to be turned on by setting KeepSessionLog), to give you a clear view of what transpires during an FTP session.

Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.