Exception of type 'HigLabo.Net.DataTransferContextException' was thrown

Oct 1, 2013 at 6:59 PM

Thank you for the excellent library for email processing.

I am using the Pop3Client to get a list of emails from a POP3 account. I am displaying some of the message fields in a webgrid.

Sometimes I get this error:

Server Error in '/' Application.

Exception of type 'HigLabo.Net.DataTransferContextException' was thrown. 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: HigLabo.Net.DataTransferContextException: Exception of type 'HigLabo.Net.DataTransferContextException' was thrown.

Source Error: 

Line 41:                         for (int i = 0; i < l.Count - 1; i++)
Line 42:                         {
Line 43:                             mg = cl.GetMessage(l[i].MailIndex);
Line 44:                             MailMessageModel mmm = new MailMessageModel();
Line 45:                             if (mg.From.Length > 0)

 Source File:  c:\Users\Tony\VBProjects2012\EmailView\EmailView\Controllers\MailMessageController.cs    Line:  43 

Sometimes if I delete the most recent emails from my mailbox using my webmail client, the error does not show again.

Is there some way to display the information about this error that would give more detail as to the source of the error? How do I debug this problem?

Any help would be gratefully appreciated.

Oct 4, 2013 at 11:53 AM
DataTransferContextException is thrown when this library could not parse response text.
It seems that parser error.
I want to solve your problem, so could you send me the raw data of this invalid mail?
You can get it by Text propety of DataTransferContextException object.

My mail address is here.
higlabo@outlook.com I'll investigate and solve it.

Oct 17, 2013 at 12:13 AM

I found that It is a invalid format email.
HigLabo could not parse it and throw exception.
You can handle it by catching exception and handle it with your requirement.