CreateMHTMLBody operation aborted

78 Views Asked by At

I'm using quite an old c# code. I can see that there is a method:

CreateMHTMLBody

    var message = new CDO.Message();
    message.CreateMHTMLBody(url)

When I set the URL to something that loads fast everything is fine but in my case, I need to render a report, which takes around 5 min. Every time after 4 min I get an operation aborted exception.

Is there any way I can change that setting and make it possible to render a URL that loads for more than 4 min? Thanks!

1

There are 1 best solutions below

0
Eugene Astafiev On

CDO is not supported any longer. Use the Outlook object model or a low-level API on which Outlook and CDO are based on - Extended MAPI. Also you may consider using any wrappers around that API, for example, such as Redemption.

Collaboration Data Objects (CDO) 1.2.1 is a client library that provides a thin wrapper over Extended MAPI functionality. This library is typically used to add email messaging functionality to custom programs. This library allows those programs to perform functions such as sending email through MAPI, working with calendars, and accessing various data in Microsoft Outlook or in Microsoft Exchange.

Microsoft Outlook 2010 and later versions include many architectural changes to the client-side MAPI subsystem. Of particular concern are scenarios in which Outlook is configured to use multiple Exchange accounts. Also, CDO 1.2.1 is a 32-bit client library and will not operate with 64-bit versions of Outlook. Given all these factors, CDO 1.2.1 is not supported for use with Outlook 2010 or later versions, Microsoft does not recommend its use with Outlook 2010 and later versions. Read more about that in the Collaboration Data Objects (CDO) 1.2.1 is not supported with Outlook 2010 and later versions article.