Exception when creating a MapiMessage object on Windows Server 2008/64 bit environment

Hi,


I am getting the exception below when trying to create a MapiMessage object using the following code:

MapiMessage message = MapiMessage.FromStream(fileStream);

This happens only on Windows Server 2008 Standard SP2/64 bit. On Windows Server 2003/32 bit it works fine. The code is being executed in a ASP.NET application.

The msg file I used is attached.

If you can’t reproduce the problem locally, please let me know how to proceed. I could provide a memory dump of the process at the moment of the the exception, or I could provide some way of you guys accessing the machine via RDP.

Exception:
Exception occurred. Details: The type initializer for ‘Aspose.Network.Outlook.x53d96b48aa328901’ threw an exception. Stack: at Aspose.Network.Outlook.x53d96b48aa328901.xc03b5d42009bec3a() at Aspose.Network.Outlook.MapiMessageReader.ReadMessage() at Aspose.Network.Outlook.MapiMessage.FromStream(Stream stream) at …

Inner Exception:
Exception type: System.TypeInitializationException
Message: The type initializer for ‘Aspose.Network.Outlook.MapiPropertyTag’ threw an exception.

Inner Exception:
Exception type: System.AccessViolationException
Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.



I'm having the exact same problem!

jhas:
Hi,

I am getting the exception below when trying to create a MapiMessage object using the following code:

MapiMessage message = MapiMessage.FromStream(fileStream);

This happens only on Windows Server 2008 Standard SP2/64 bit. On Windows Server 2003/32 bit it works fine. The code is being executed in a ASP.NET application.

The msg file I used is attached.

If you can't reproduce the problem locally, please let me know how to proceed. I could provide a memory dump of the process at the moment of the the exception, or I could provide some way of you guys accessing the machine via RDP.

Exception:
Exception occurred. Details: The type initializer for 'Aspose.Network.Outlook.x53d96b48aa328901' threw an exception. Stack: at Aspose.Network.Outlook.x53d96b48aa328901.xc03b5d42009bec3a() at Aspose.Network.Outlook.MapiMessageReader.ReadMessage() at Aspose.Network.Outlook.MapiMessage.FromStream(Stream stream) at ...

Inner Exception:
Exception type: System.TypeInitializationException
Message: The type initializer for 'Aspose.Network.Outlook.MapiPropertyTag' threw an exception.

Inner Exception:
Exception type: System.AccessViolationException
Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.



Hi,


I tried loading the attached msg file in a console and web (ASP.NET) application, but could not reproduce this bug. I used Aspose.Network for .NET 5.2 and Windows 2008 Server x64.

There is a similar issue related to loading msg file (which has nested msg attachments) on 64 bit OS. But for the attached file, please suggest how to reproduce this.

Hi, similar issue here. Converting from EML to MSG file throws the same exception when run under following conditions:

FAILS
Compiled in "Any CPU", run on Server 2008 R2 (64-bit)

RUNS
Compiled in "Any CPU", run on Widows 7 PRO (64-bit)
Compiled in "x86", run on Server 2008 R2 (64-bit)

I am currently evaluating the product and ability to run in native 64-bit mode on 2008 R2 is an absolute must.

Attached is sample EML file that I am trying to convert.

Cheers,
Andrei

Hi Andrei,


Thanks for the details, we were able to reproduce the exception this way. I have logged this bug in our issue tracking system (ID: 16346). We will look into it and will notify you as soon as we make any progress to fix this. Sorry for the inconvenience.

Hi,

Could you please check the attached dll. We tested it on both 32 and 64 bit OS (including Windows Server 2008 x64) and found it working without any memory exception.

Hi Saqib

The dll does not fail anymore and all attachements are extracted in my solution - BUT the attachments after number 3 claims that it is a trial license - even though I'm adding a licence using embedded resource!

Does this dll not apply to the license or do I need an updated license?

Hi,

It is the evaluation version limitation. Could you please check if it also appends " (Aspose.Network Evaluation)" message to the subject? In these conditions, the license is expired.

You can check the expiry date in the license by opening it in any text file editor like notepad and examining tag.

It seems to work fine with me (I’m not working with attachments though, just converting the e-mail itself to PDF).


Can I go ahead and use this DLL in production?
jhas:
It seems to work fine with me (I'm not working with attachments though, just converting the e-mail itself to PDF).

Can I go ahead and use this DLL in production?


Yes, you may use this dll in the production environment. The attachment issue is only related to the license.