client operation failed on determining TNEF attachment type

C

CTDev Team

Hi,

We are using Exchange Server 5.5, and have applications written in VB6 and
C# that read and process emails.

We are experiencing intermittent errors similar to

C# Application

System.Runtime.InteropServices.COMException (0x80004005): The client
operation failed. [Microsoft Exchange Server Information Store -
[E_FAIL(80004005)]] at System.RuntimeType.ForwardCallToInvokeMember(String
memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes,
MessageData& msgData) at MAPI.Attachment.get_Type()

VB Application

-2147467259 = The client operation failed. [Microsoft Exchange
Server Information Store

The error happens on the determination of the attachment type, as shown in
these code snippets:

C# Application

if ((CdoAttachmentType)att.Type ==
MAPI.CdoAttachmentType.CdoEmbeddedMessage)

VB Application

If CInt(objMessage.Attachments(j).Type) <> CdoEmbeddedMessage Then

As it is, the fact that there are attachments is recognized, but fails in
determining the attachment types.

Please note that we can open the emails and attachments from Outlook without
any problems.

We noticed that this behavior happens for emails with source containing
something similar to:

X-MS-TNEF-Correlator: 00000000FCD67D6733BD374CB183ED8ADF9C0E6BE44E3100
This is a multi-part message in MIME format.
--Boundary_(ID_UMmVtfCC+Dy+KJBXVN6RQg)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT

--Boundary_(ID_UMmVtfCC+Dy+KJBXVN6RQg)
Content-type: application/ms-tnef; name=winmail.dat
Content-transfer-encoding: base64
Content-disposition: attachment; filename=winmail.dat

Any help you can provide to help us understand the problem and work towards
a solutions is greatly appreciated.

Thanks and regards,
Romel
 
C

Cor Ligthert

Romel,

You sand this message to the newsgroup from VBNet and not to C#.

VB6 and VBNet are almost complete different languages and of course
especially the errorcodes. (C# and VBNet are lookalikes and give the same
errorcodes, so maybe you are lucky and somebody recognise that)

However that change is in my opinion small, so why not try it in
microsoft.public.dotnet.languages.csharp
and maybe for VB6 (the most active VB6 newsgroup VB6 now)
microsoft.public.vb.generaldiscussions

I hope you find your solution

Cor
 
C

CTDev Team

Hi Cor,

Thanks a lot for your reply.

The same question was originally posted to the just to the csharp group
yesterday, and we decided to post it to the other related groups as well.

As you have suggested though, we are including

microsoft.public.vb.generaldiscussions

in this post.

Again, many thanks.

regards,
Romel

Cor Ligthert said:
Romel,

You sand this message to the newsgroup from VBNet and not to C#.

VB6 and VBNet are almost complete different languages and of course
especially the errorcodes. (C# and VBNet are lookalikes and give the same
errorcodes, so maybe you are lucky and somebody recognise that)

However that change is in my opinion small, so why not try it in
microsoft.public.dotnet.languages.csharp
and maybe for VB6 (the most active VB6 newsgroup VB6 now)
microsoft.public.vb.generaldiscussions

I hope you find your solution

Cor

CTDev Team said:
Hi,

We are using Exchange Server 5.5, and have applications written in VB6 and
C# that read and process emails.

We are experiencing intermittent errors similar to

C# Application

System.Runtime.InteropServices.COMException (0x80004005): The client
operation failed. [Microsoft Exchange Server Information Store -
[E_FAIL(80004005)]] at System.RuntimeType.ForwardCallToInvokeMember(String
memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes,
MessageData& msgData) at MAPI.Attachment.get_Type()

VB Application

-2147467259 = The client operation failed. [Microsoft Exchange
Server Information Store

The error happens on the determination of the attachment type, as shown in
these code snippets:

C# Application

if ((CdoAttachmentType)att.Type ==
MAPI.CdoAttachmentType.CdoEmbeddedMessage)

VB Application

If CInt(objMessage.Attachments(j).Type) <> CdoEmbeddedMessage Then

As it is, the fact that there are attachments is recognized, but fails in
determining the attachment types.

Please note that we can open the emails and attachments from Outlook without
any problems.

We noticed that this behavior happens for emails with source containing
something similar to:

X-MS-TNEF-Correlator: 00000000FCD67D6733BD374CB183ED8ADF9C0E6BE44E3100
This is a multi-part message in MIME format.
--Boundary_(ID_UMmVtfCC+Dy+KJBXVN6RQg)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT

--Boundary_(ID_UMmVtfCC+Dy+KJBXVN6RQg)
Content-type: application/ms-tnef; name=winmail.dat
Content-transfer-encoding: base64
Content-disposition: attachment; filename=winmail.dat

Any help you can provide to help us understand the problem and work towards
a solutions is greatly appreciated.

Thanks and regards,
Romel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top