Free Support Forum -

"Invalid character at position 2" when opening .msg with .msg attachment


I'm getting this error below when I'm using the v 6.1.0 .net 1.1 dll to open a .msg file with another .msg as an attachment. I've seen messages where it was fixed with the .net 2 and 3. Is there a fix for .net 1.1?

The code I use is:

Dim mailMsg As MailMessage
mailMsg = MailMessage.Load("c:\temp\myMSG.msg", MessageFormat.Msg)

[System.ArgumentException]: {System.ArgumentException}
HelpLink: Nothing
InnerException: Nothing
Message: "Invalid character at position 2.
Parameter name: value"
Source: "Aspose.Network"
StackTrace: " at Aspose.Network.Mime.x0345dc73c0566482.x0e1d022367c72020(String xbcea506a33cf9111, String xae050273e3024171, Boolean x360e955665f018a5)
at Aspose.Network.Mime.x191dcb88c409b8dd..ctor(String value, Encoding encoding, Boolean checkData)
at Aspose.Network.Mime.x191dcb88c409b8dd..ctor(String value, Encoding encoding)
at Aspose.Network.Mime.xe1b4184405fe3b9a.set_x191dcb88c409b8dd(String xbcea506a33cf9111)
at Aspose.Network.Mail.MailMessage.set_Subject(String value)
at Aspose.Network.Outlook.MailMessageInterpretor.LoadMessageHeader(MailMessage mailmessage, MapiMessage mapiMessage)
at Aspose.Network.Outlook.MailMessageInterpretor.Interpret(MapiMessage mapiMessage)
at Aspose.Network.Mail.MailMessage.Load(String fileName, MessageFormat format)
at DWBot.DWBotDB.ExtractMSGAttachments(String strMSGFile, String strAttachFolder) in C:\Edisco\Source\ForManny_DWBot [MSG proc Jan 31 2011]_src\DWBotDB.vb:line 15054"
TargetSite: {System.Reflection.RuntimeMethodInfo}


Thank you for inquiry.

Could you please post the MSG file here so that we could reproduce this issue at our end? I just checked the dll for .NET 1.1 and loaded an MSG file with MSG attachments, but could not find any issue.

Hi Saqib,

Thanks for you quick response. Attached is a zip with 2 of the .msg causing the error. It's not just a .msg with a .msg attachment. The attached zip has 1 .msg that has no attachment and the other one has a ppt attachment.



Hi Manny,

We do development for .NET 2.0 and later frameworks. .NET 1.1 is currently low priority. I have logged this bug (ID: 24425) in our issue tracking system. We will inform you when it gets fixed. Sorry for the inconvenience.

Hi Manny,

We are analyzing the issues for .NET framework 1.1 dll. Could you please send me your order ID and license file using the “Contact” --> “send saqib.razzaq an email” button on this thread for our reference?