Read and Write Binary Files in VB6, VBScript, ASP

The Chilkat FileAccess ActiveX is a freeware component that may be used to read and write binary files in VBScript, ASP, VB6, etc. Here are some sample code fragments: VBScript ‘ Download the Chilkat FileAccess ActiveX (freeware) from here: ‘ set fac = CreateObject(“Chilkat.FileAccess”) ‘ Read an entire file as binary data (returns Variant containing byte array) byteData = […]

OAEP Padding vs. PKCS v1.5 Padding Error

This error occurs if RSA encrypted data using OAEP padding is decrypted with the assumption that PKCS v1.5 padding was used. To solve the problem, set the OaepPadding property = true prior to decrypting. … RSA_decrypt: KeyType: Private InputSize: 128 Padding: PKCS v1.5 ModulusBitLen: 1024 Invalid PKCS v1.5 padding header (1) FoundBlockType: 197 ExpectingBlockType: 2 …

Outlook vs. Mail Servers

Question: I am using your email ActiveX control and wanted to know if there is a way to update MS Outlook in the sent folder with the email I am sending with your control? Answer: Email clients communicate with email servers using a well-known protocol. Email clients do not generally communicate with other email clients. Here is a non-exhaustive list […]

Port 465 is Normally the Implicit SSL SMTP Port, but not always…

If you open a DOS prompt and telnet to an SMTP server (typically port 25 for non-SSL, port 465 for SSL), you should get a human-readable printable-text “HELLO” message from the non-SSL port, but binary SSL-handshake protocol gobbly-gook from an implicit SSL port. For example: > telnet 25 220 ESMTP MailEnable Service, Version: 0-1.85- ready at 05/30/08 08:04:19 […]

Keeping an FTP Session Open

Question: We are making a timed call to an FTP folder to check for new files. Once a file appears, we download it. Is it possible to keep the session open between these timed calls, or should it be closed and re-opened every time we check? The interval is very small 2 seconds, but may run for days at a […]

Modify Email on IMAP Server?

Question: I was wondering if the IMAP library for .NET allows me to go into an IMAP server, and change the body of a previous email? Is any email fair game? Or does it have to be in drafts? If so, is there a special way to save it to the server? If this does not work, can I delete […]