Quantcast
Channel: Chilkat Forum - latest questions
Viewing all 1061 articles
Browse latest View live

New computer and Chilkat is stuck

$
0
0

I had to replace my computer. Brand new everything with Windows 10 Home 64 bit.

I keep all my dlls in one directory that I copied over. I wanted to install the 32 bit version since i'm using Foxpro. I ran register_win32.bat and everything flew by. Then when I ran testCreateObjects.vbs I got the old "can't create object". Same with testCreateObjects_x64.bat.

I've reviewed the other threads about this and nothing seems to help. Any thoughts?


Look at the BOM header of a string and determine the encoding method?

$
0
0

Is there a ChilKat API anywhere that can look at the BOM header of a string and determine the encoding method. I can easily write this but didn't want to reinvent the wheel

Socket receive Event for Delphi DLL version?

$
0
0

I would like to just connect up the socket to the other computer and then get a Delphi event every time data has been received.
In the "(Delphi DLL) Asynchronous Sockets - Reading/Writing Data" example it is just looping waiting for data.

I have not found that events are supported for the delphi dll. ( I am missing something)

So does this mean I have to spin up another thread to do the work of checking for in coming data or is there some simpler solution that I am missing.

If I do have to spin up a thread are there any examples?

Thanks

Tom

Uploading multiple files fails with write-only permissions on sftp server

$
0
0

Goodmorning,

we're using a script to upload multiple files to an sftp server. This scripts works exept with one sftp server, where we only have write-only permissions. It will upload the first file, but after that all file uploads fails.

We make use of UploadFileByName. Please find below logfile. It looks like it tries to open the file. Does anybody know why it tries to open the file and if we can prevent this?

 localFileSize: 0
  sftpOpenFile:
    remotePath: //in/test4.txt
    access: writeOnly
    createDisposition: createTruncate
    v3Flags: 0x1a
   Sent FXP_OPEN
    StatusResponseFromServer:
      Request: FXP_OPEN
      InformationReceivedFromServer:
        StatusCode: 3
        StatusMessage: Permission denied
      --InformationReceivedFromServer
    --StatusResponseFromServer
    retryFilepath: .//in/test4.txt
    remotePath: .//in/test4.txt
    access: writeOnly
    createDisposition: createTruncate
    v3Flags: 0x1a
    Sent FXP_OPEN
    StatusResponseFromServer:
      Request: FXP_OPEN
      InformationReceivedFromServer:
        StatusCode: 3
        StatusMessage: Permission denied
      --InformationReceivedFromServer
    --StatusResponseFromServer
  --sftpOpenFile
  Failed to open file.
--uploadFileByName
Failed.   --UploadFileByName

--ChilkatLog

I got a error 'Argument list too long' with sftp connet

$
0
0

Hi, I'm trying the sftp feature with android, but i encountered a error like below when i tried to connect to my own ssh server.

Error: ---------------------------------------------- 07-27 17:24:16.437 3341-3341/com.tabnage.digitalsignage.filesync I/Chilkat: ChilkatLog: Connect_SFtp: DllDate: May 28 2017 ChilkatVersion: 9.5.0.68 UnlockPrefix: Anything for 30-day trial Architecture: Little Endian; 32-bit Language: Android Java VerboseLogging: 0 SftpVersion: 0 connectInner: sshConnect: connectSocket: connect_ipv6_or_ipv4: getAddressInfo: Failed to get host address info. (4) errno: 7 osErrorMessage: Argument list too long hostOrIpAddr: sub.hostname.com port: 10022 Retrying DNS lookup... Failed to get host address info. (4) errno: 7 osErrorMessage: Argument list too long hostOrIpAddr: sub.hostname.com port: 10022 --getAddressInfo getAddressInfo failed. --connect_ipv6_or_ipv4 --connectSocket Failed to establish initial TCP/IP connection --sshConnect --connectInner Failed. --Connect_SFtp --ChilkatLog


and source code is below:

package com.tabnage.digitalsignage.filesync;

import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.View; import android.view.Menu; import android.view.MenuItem; import com.chilkatsoft.*;

public class MainActivity extends AppCompatActivity {

private static final String TAG = "Chilkat";

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);

    FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    fab.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                    .setAction("Action", null).show();
        }
    });

    CkSFtp sftp = new CkSFtp();

    //  Any string automatically begins a fully-functional 30-day trial.
    boolean success = sftp.UnlockComponent("Anything for 30-day trial");
    if (success != true) {
        Log.i(TAG, sftp.lastErrorText());
        return;
    }

    //  Set some timeouts, in milliseconds:
    sftp.put_ConnectTimeoutMs(5000);
    sftp.put_IdleTimeoutMs(10000);

    int port;
    String hostname;
    hostname = "sub.hostname.com";
    port = 10022;
    success = sftp.Connect(hostname,port);
    if (success != true) {
        Log.i(TAG, sftp.lastErrorText());
        return;
    }
    success = sftp.AuthenticatePw("username","password");
    if (success != true) {
        Log.i(TAG, sftp.lastErrorText());
        return;
    }

    success = sftp.InitializeSftp();
    if (success != true) {
        Log.i(TAG, sftp.lastErrorText());
        return;
    }

    //  To find the full path of our user account's home directory,
    //  call RealPath like this:
    String absPath;
    absPath = sftp.realPath(".","");
    if (sftp.get_LastMethodSuccess() != true) {
        Log.i(TAG, sftp.lastErrorText());
        return;
    }
    else {
        Log.i(TAG, absPath);
    }

    Log.i(TAG, "Success.");
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.menu_main, menu);
    return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();

    //noinspection SimplifiableIfStatement
    if (id == R.id.action_settings) {
        return true;
    }

    return super.onOptionsItemSelected(item);
}
static {
    // Important: Make sure the name passed to loadLibrary matches the shared library
    // found in your project's libs/armeabi directory.
    //  for "libchilkat.so", pass "chilkat" to loadLibrary
    //  for "libchilkatemail.so", pass "chilkatemail" to loadLibrary
    //  etc.
    //
    System.loadLibrary("chilkat");

    // Note: If the incorrect library name is passed to System.loadLibrary,
    // then you will see the following error message at application startup:
    //"The application <your-application-name> has stopped unexpectedly. Please try again."
}

}

I hope you give me nice solutions. thanks regard.

[Swift] xml SearchForAttribute method

$
0
0

Hi all,

I would like to ask if there is possible for multiple conditions search by the method of SearchForAttribute. (in Chilkat v9.5.0)

After reading the example, I found that there is only one condition for the search such as

' Search for all "fruit" nodes having a color attribute ' where the name of the color ends in "e"; xFound = xSearchRoot.SearchForAttribute(xBeginAfter,"fruit","color","*e")

Here is my sample code:

<Tables>
  <Table code="101" section="1" status="0" />
  <Table code="102" section="1" status="1" />
  <Table code="201" section="2" status="0" />
  <Table code="202" section="2" status="0" />
  <Table code="301" section="3" status="1" />
  <Table code="302" section="3" status="1" />
</Tables>

I would like to search the table for both conditions of "section in (1,2) AND status=1"

Thanks to advise.

Posting large json with curl

$
0
0

Hi, i want to reproduce this curl request (PHP) with chilkat in vb.net

$parameters = array( 'action' => 'import', 'controller' => 'Defect', ); $url .= '&'.http_build_query(array('tx_itkdefectdetector_frontend' => $parameters)); $curlArray = array( CURLOPT_POST => 1, CURLOPT_POSTFIELDS => array('tx_itkdefectdetector_frontend[jsonData]'=>$jsonData), CURLOPT_FOLLOWLOCATION => 1, CURLOPT_HEADER => 0, CURLOPT_RETURNTRANSFER => 1, CURLOPT_TIMEOUT => 10, CURLOPT_VERBOSE => 1, ); $curl = curl_init($url); curl_setopt_array($curl, $curlArray);

the url is something like this

https://mm.itk-rheinland.de/index.php?id=4&type=xxxxxxx&tx_itkdefectdetector_frontend[actio n]=import&tx_itkdefectdetector_frontend[controller]=Defect&tx_itkdefectdetector_frontend[jsonD ata]={jsonData}

The json is in string form, but can have image data (base64_encode)m included in the post, so it becomes to long for an URL request.

Can someone point me to the correct way posting it from code in vb.net

THX

Martin

C# Socket DnsLookup on different server (NS)

$
0
0

Hello!

I would like to know if there is a way to bypass the limitation of the native C# Dns class through the use of Chilkat Socket or other component to perform a DNS query but specifying a specific DNS server. This could be very useful when we create components to scan larger networks or many VPN nodes having each their own DNS.

Best regards!


Universal library compile error

$
0
0

Compiling under XCode 8.3.3 for iOS 10+

I created a universal binary as outlined using the following script:

libtool -static arm64/libchilkatIos.a armv7/libchilkatIos.a armv7s/libchilkatIos.a -o libchilkatIos.a

It builds a resulting .a file. I then add that .a file to my project and an archive for submission using "Generic iOS Device".

When I perform the archive build I get the following error: ld: warning: ignoring file /Users/blah/directory/ChilKat/lib/arm64/libchilkatIos.a, file was built for archive which is not the architecture being linked (armv7): /Users/blah/directory/ChilKat/lib/arm64/libchilkatIos.a

Is there a super fast way to detect if a URL is no longer valid?

$
0
0

When fetching feeds (for instance) sometimes a particular feed will have been discontinued and the URL is no longer valid. When I hit one of these the delay is equal to the connect timeout setting (say 5 seconds).

Is there a super fast way to detect if a URL is no longer valid?

Thanks!

SSH library delay

$
0
0

Hi, quick question, can I set a delay when executing commands through SSH C# Chilkat library? E.g send command, wait 350ms, send command, wait 350ms, etc., etc.

Cannot connect to Gmail IMAP server

$
0
0

Using the example provided in https://www.example-code.com/csharp_winrt/imap_ssl.asp

When I call success = await imap.ConnectAsync("imap.gmail.com");

I get as a last error

ChilkatLog: Connect_Imap: DllDate: May 29 2017 ChilkatVersion: 9.5.0.68 UnlockPrefix: Anything for 30-day trial Architecture: Little Endian; 32-bit VerboseLogging: 0 connectInner: AutoFix: IMAP port 993 is traditionally for implicit SSL/TLS. To prevent auto-fix, set the AutoFix property = False/0 connectToImapServer: hostname: imap.gmail.com port: 993 socket2Connect: connect2: connectImplicitSsl: clientHandshake: clientHandshake2: readHandshakeMessages: Failed to read beginning of SSL/TLS record. b: 0 dbSize: 0 nReadNBytes: 0 idleTimeoutMs: 60000 --readHandshakeMessages --clientHandshake2 --clientHandshake Client handshake failed. (3) --connectImplicitSsl ConnectFailReason: 103 --connect2 --socket2Connect failReason: 0 --connectToImapServer connect failed. --connectInner Failed. --Connect_Imap --ChilkatLog

Thanks for your help

Specify signed attributes in PKCS7 signature

$
0
0

Hi, I am working on a SCEP client for iOS and for requesting a certificate I need signed PKCS7 data. To sign a request I am using the crypt.createP7M method, which is working fine. However, SCEP requires to add some additional signed attributes:

https://tools.ietf.org/html/draft-nourse-scep-17#section-4.2

How can I add signed (authenticated) attributes to the signature? Is that even possible with Chilkat? Or can I somehow create a PKCS7 signature manually with the additional attributes?

Thx, Nicolas

Unlock MIME problem

$
0
0

I bought a "Chilkat 1-Developer Email License" in 2015 and have been using it successfully. This code works with no problems:

success = mailman.UnlockComponent("MyUnlockCode")

Some of the emails I have been trying to decode are now coming as *.eml files so I tried to follow the example here: https://www.example-code.com/vbnet/mime_extractFiles.asp

However, the following code:

Dim mime As New Chilkat.Mime
Dim success As Boolean
success = mime.UnlockComponent("Anything for 30-day trial.")

returns False for Success, regardless of whether I use my unlock code or just leave as default from the example. It recognises the MIME class with no problem.

Do I need to buy another different component to activate MIME? I can't see it in the list of products here: https://www.chilkatsoft.com/products.asp

Do I need to buy a bundle? If so, can I upgrade me existing licence or is it too old?

Thanks!

Remove Start of body

$
0
0

Hi!

I have a small issue where I need to remove the body in the email. Marked with bold is this even possible?

By dumping the .eml file to disk this is what I get;

MIME-Version: 1.0

Date: Thu, 03 Aug 2017 17:32:44 +0200 Message-ID: D05BE05282AB47EB10E490ABD6FE94501A050EE3@ITEM-S36546 X-Priority: 3 (Normal) CKX-Bounce-Address: From@Address.com From: From@Address.com Subject: This is subject Content-Type: multipart/mixed; boundary="------------090606030907080305090305"

--------------090606030907080305090305 Content-Type: text/plain Content-Transfer-Encoding: 7bit

--------------090606030907080305090305 Content-Type: application/octet-stream; name="MyFile.myFileExtension" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="MyFile.myFileExtension"

FBUWFxg=

--------------090606030907080305090305--

As you can see I have an attachment, which basically is a few bytes, just for test purposes. The system I'm sending the mail to does not expect a body in the mail and therefore that system will fail(I have no control over this system). Is it somehow possible to remove the header of the body? so the result would be

MIME-Version: 1.0
Date: Thu, 03 Aug 2017 17:32:44 +0200
Message-ID: <D05BE05282AB47EB10E490ABD6FE94501A050EE3@ITEM-S36546>
X-Priority: 3 (Normal)
CKX-Bounce-Address: From@Address.com
From: From@Address.com
Subject: This is subject
Content-Type: multipart/mixed;
     boundary="------------090606030907080305090305"

--------------090606030907080305090305
Content-Type: application/octet-stream;
     name="MyFile.myFileExtension"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="MyFile.myFileExtension"

FBUWFxg=

--------------090606030907080305090305--

Override existing boundary parameter

$
0
0

Hi!

Using the Mail class is it possible to change the boundary generation? I want to achieve the same as this guy asks for (this is plain Java tho)

MWS ListOrders / ListOrdersByNextToken

$
0
0

Hi I am using the REST to process an MWS request to Amazon for ListOrders That works fine!

To get subsequent pages thou I use the NextToken given by Amazon in the ListOrders result and pass this to ListOrdersByNextToken. When I send this to Amazon it fails with an invalid Signature so I am wondering if anyone has any sample code of this process. I am concerned that the AddMwsSignature in ChilKat is somehow not getting or incorrectly signing the Token as all the otehr parameters etc are the same as ListOrders!

Thanks

Andy

FTP downloading - indication of completion

$
0
0

Hello, I recently replaced the original programmer who used Chilkat to process FTP requests.

Their code, which was copied verbatim from the website, was slightly altered as follows:

success = sftp.DownloadFileByName(remoteFilePath, localFilePath) If (success <> True) Then Throw New System.Exception(sftp.LastErrorText)

If File.Exists(localFilePath) Then File.Copy(localFilePath, archiveFilePath, True)

success = sftp.RemoveFile(absPath & "/" & fileObj.Filename) If (success <> True) Then Throw New System.Exception(sftp.LastErrorText)

On July 17th, we received a call from an upset customer who wanted to know why their file wasn't processed. Upon investigation. it looks as though the file was removed from the FTP without a local copy present.

In addition, I received two of the following error messages:

ChilkatLog:

RemoveFile: DllDate: Mar 20 2017 ChilkatVersion: 9.5.0.66 UnlockPrefix: [removed by me] Architecture: Little Endian; 32-bit Language: .NET 4.0 VerboseLogging: 0 SshVersion: SSH-2.0-CerberusFTPServer_8.0 FIPS SftpVersion: 3 removeFile: remotePath: [removed by me] StatusResponseFromServer: Request: FXP_REMOVE InformationReceivedFromServer: StatusCode: 22 StatusMessage: --InformationReceivedFromServer --StatusResponseFromServer --removeFile Failed. --RemoveFile --ChilkatLog

We have full read/write/delete rights on the FTP server. I added the exception handling (which was previously the "console.writeline" as was in the code example) and these messages are quite frequent now.

QUESTION: the line "sftp.DownloadFileByName" - is the success check that follows a COMPLETION of the download file or that it is downloading the file?

I need to know quickly because apparently, this wasn't the first time. The programmer used the Chilkat code example verbatim, and this why no one noticed before.

The documentation is... too sparse to make a determination.

Thanks for the help.

hash without encoding

$
0
0

I need to do aes-128, cbc..without encoding at each step..i would like to do encoding only at the end..what functions should i use?

current implementation

  • crypt.SetEncodedIV
  • crypt.HashStringENC
  • crypt.EncryptStringENC

Required implementation

  • set iv without encoding
  • set hash (of key) without encoding
  • encrypt string without encoding (using key and IV)
  • concat iv to encrypted string
  • now base64 encode

which functions should i use?

smtp Multiple ReplyTo addresses not supported by Chilkat?

$
0
0

rfc2822 implies multiple ReplyTo addresses should be supported. From: https://www.ietf.org/rfc/rfc2822.txt "When the "Reply-To:" field is present, it indicates the mailbox(es) to which the author of the message suggests that replies be sent."

But setting the ReplyTo property to multiple addresses (e.g. "user1@acme.com,user2@acme.com") doesn't seem to work in later versions of Chilkat. The Reply-To header in the eml file gets set only to the first address.

How can we set ReplyTo option to multiple addresses?

Viewing all 1061 articles
Browse latest View live