VCardContact question + Bug

Hello

  1. I think VCardContact.ExplanatoryInfo.ProdId = “blah” is not honored and applied to the saved vcf.
    While it’s clearly mentioned here:
    RFC 2426: vCard MIME Directory Profile

  2. And VCardContact.Save(“path”, ContactSaveFormat.VCard) will save as UTF-8 without BOM, expected? Just asking if BOM should be included or not when saving vcf?
    Thanks.

Hello
If you try to load this vcf which was made using Windows 10 Contacts:

MapiContact.FromVCard
and also:
VCardContact.Load

You will get error:
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

Please note that this is not due to using an expired certificate (which is valid, not self signed)
I have tested with a current valid public key and the same exception occured!
Thanks for your consideration.

Australian_Dev_Nerds@gmail_com.zip (1.8 KB)

Hello,

For UTF-8, the BOM is optional and not universally supported or required. Most applications assume UTF-8 encoding for VCard files without a BOM.

A new ticket was created for the remaining requests:

Issue ID(s): EMAILNET-41370

Hello,
Thanks, by the way may I ask how to attach a public key certificate to a vcf?
Here mentions that it can be set:

But is for the personalinfo.vcard.

VCardContact.Security.Key is the way to go, but how to assign from the public key of a X509Certificate or X509Certificate2 ?
Thanks.

Update:
I’ve figure out this far:

VCardContact.Security.Type = “X509”
VCardContact.Security.Encoding = Email.Mime.TransferEncoding.Base64
VCardContact.Security.Key = Cert509.GetPublicKeyString

The result:

KEY;X509;ENCODING=BASE64;CHARSET=utf-8:xxxxxxxxxKEYxxxxxxxxxx

First, where this ;CHARSET=utf-8 came from?! I didn’t set it and didn’t see it in the past in Vcf files made by Outlook to set Utf-8 for KEY field.

Second, the whole string is just added to the output right after utf-8:
Withoug initial line wrap and its following wraps at 72 characters, plus an space in the beginning of each line!
Thanks,

Hello,

I’ve added this additional request to the ticket.

Hello
24.6 release notes: EMAILNET-41365 is this case for me or related to this case?
Thanks :slight_smile:

Hello
EMAILNET-41340 Add .Abort/.Cancel methods for long-running operations
Does it apply to PersonalStorage SplitInto and MergeWith too?

Also will apply to ConvertPersonalStorageToMbox / MboxToPst?

Thanks.

Hello,

No, EMAILNET-41365 is a different case.

EMAILNET-41340 only applies to split operation in MboxStorageWriter. Everything about Personal Storage will be implemented soon.

1 Like

Hi,

Regarding EMAILNET-41365, I don’t think it’s fixed completley yet. It’s much better than 24.5 but some contacts still fail.

They are now getting stuck in the FromVCard function instead of throwing an exception.

I can provide a sample contact which shows the issue happening if needed.

In my case if I remove all line breaks from the INTERNET field it seems to work fine.

Hello @andrezammiths,

Regarding EMAILNET-41365, the problem that it describes has been resolved. Regarding your case, we would appreciate it if you could share an example file and provide the necessary instructions to reproduce your problem.

Thank you.

Hi @dmitry.samodurov,

Please find the sample attached.

I’m reading the contents of the contact to memory which results in a byte[]. That byte[] is then passed into a MemoryStream which is used as a parameter to FromVCard.

MapiContact.FromVCard(memoryStream, Encoding.UTF8);

The FromVCard call never returns and seems to be stuck.

I also attached a version of the same contact but with all line breaks removed from the Internet field. This version works fine with FromVCard.

Aspose Sample.zip (1018 Bytes)

@andrezammiths,

We have opened the new ticket in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): EMAILNET-41379

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like