System.AccessViolationException: Attempted to read or write protected memory

Hi,

Sending SMTP email fails with the following error:

Unhandled Exception: Aspose.Network.Mail.SmtpException: Failure sending mail. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I'm using Aspose.Network version 4.8.0.5 The error shows up both in windows 7 (x64) and Windows 2008 (x64).

I noticed in your forum that this error occured already in previous versions September 2009) and would be solved quickly. Did I missed something or is this not fixed yet.

This is a very serious issue for me because my customers can not run my product under their x64 OS.

Any help on this issue is highly appriciated.

Thanks,

Ron

Hi Ron,

Thanks for considering Aspose.

Could you please try the latest version of Aspose.Network 4.9 and test if you still get the exception on 64 bit operating systems? I used the following sample code to send email using Aspose.Network 4.9 and Windows 2008 Server x64 and email was sent successfully.

SmtpClient client = new SmtpClient(“smtp.gmail.com”, 587, “user@gmail.com”, “pwd”);
client.EnableSsl = true;
client.SecurityMode = SmtpSslSecurityMode.Explicit;

MailMessage msg = new MailMessage(“from@gmail.com”, “to@gmail.com”);
msg.Subject = “Email Send Test”;
msg.Body = “This is a test”;

client.Send(msg);

Hi,

It works both on x86 and x64.

This ticket can be closed.

Thanks for your quick response,

Ron