MS CNG NCryptSignHash returns 0x80090020

We’ve seen this error when trying to sign using a smart card: msCngSignWithCert Acquired CNG private key. dwKeySpec: 0xffffffff key is CERT_NCRYPT_KEY_SPEC setSmartCardPin: setting smart card pin… –setSmartCardPin Using PKCS1 padding. msCngSign.NCryptSignHash failed. failed to sign. secStatus: 0x80090020 –msCngSignWithCert The 0x80090020 error is a generic “NTE_FAILED: An internal error occurred”. See https://docs.microsoft.com/en-us/windows/desktop/com/com-error-codes-4 To clarify: Chilkat calls the Microsoft CNG (Cryptographic […]

Mismatch between the processor architecture of the project being built “MSIL” and the processor architecture …

Question: When building my C# solution I get the following warning on several of the projects:   Severity Code Description Project File Line Suppression State Warning There was a mismatch between the processor architecture of the project being built “MSIL” and the processor architecture of the reference “ChilkatDotNet47, Version=9.5.0.75, Culture=neutral, PublicKeyToken=ab5fc1f999ef09bd, processorArchitecture=AMD64”, “AMD64”. This mismatch may cause runtime failures. Please […]

Parsing Extremely Large XML Files

Question: I’m trying to read a very large xml file. It’s about 500MB. The content is a list of records. There are about 100,000 nodes with the same tag that contain single records.   Is there a limit on the file size or number of nodes that can be processed? Answer: There is no limit other than running out of memory.  […]

CkPython vs. Chilkat2-Python

Question: Should I use CKPython or Chilkat2-Python for a new development (environment = Windows and Python 3.6) What’s the difference between these? Answer: The CkPython API is the original Chilkat for Python API that uses something called SWIG (swig.org) to produce the Python wrappers around the C/C++ implementation.  The result is that CkPython API has a style with more a […]

Test Creating ActiveX Object using VBScript (.vbs)

This article guides you to verify that the Chilkat ActiveX is installed properly and that it’s possible to create an instance of the object. Please first read this tutorial to understand basic concepts:  https://chilkatsoft.com/activex_dll_registration_tutorial.asp Step 1.  Download the 32-bit Chilkat ActiveX from here: https://chilkatsoft.com/downloads_ActiveX.asp *select the Zip Install (manual registration) * DO NOT unzip in C:\Windows or C:\Windows\system32.  Never put […]

Convert CSV to utf-8?

Question: We’ve purchased a few of your products in the past and they work great.  Here’s a question on another one:  I’m creating a .csv file within a vfp program and I need it to be an Utf-8 format.  I’m not finding anywhere how to do that programatically.  Do you have a product that will convert? Answer: For those that […]

Chilkat HTTP Methods that return an HttpResponse Object

Question: I am having a problem identifying read timeouts from sites. I set ConnectTimeout and ReadTimeout properties of the HTTP object. When the site fails to respond within ReadTimeout, the following happens: PText still returns 0 PText returns a response object Reading of StatusCode and StatusText properties of the response object is successful Reading of BodyStr property of the response […]

PayPal REST API OAuth2 Authentication

There’s a lot of confusion about exactly what login/password (or clientID/clientSecret) is to be used for obtaining an OAuth2 access token for PayPal REST API calls. PayPal uses simple HTTP Basic authentication (protected by a TLS connection) to obtain an access token.   Using the Chilkat Rest library, your application would provide the credentials in this way (in pseudo-code) rest.SetAuthBasic(“CLIENT_ID”, […]