We have started using the Smtp features of Aspose.Network and have found that it fails on 64-bit environments. The following test program works fine in 32-bit environments (note the addresses have been anonimized):
using System;
using Aspose.Network.Mail;
namespace EmailTest {
class Program {
static void Main() {
SmtpClient client = new SmtpClient(“mail.mycompany.com”);
client.AuthenticationMethod = SmtpAuthentication.None;
MailMessage msg = new MailMessage("support@mycompany.com", "bill.smith@mycompany.com");
msg.Subject = “Email Send Test”;
msg.Body = “This is a test”;
client.Send(msg);
}
}
}
However, when the same code is run in a 64-bit environment it fails with the following exception:
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.
at Aspose.Network.Mail.SmtpClient.xd77ef5d42b5563e3(IEnumerator x74133ad33ffdf023, xe0a8a59934b83f35 xbef4c7a62a5d773b)
at Aspose.Network.Mail.SmtpClient.Send(MailMessage message)
— End of inner exception stack trace —
at Aspose.Network.Mail.SmtpClient.Send(MailMessage message)
at EmailTest.Program.Main() in C:\PWS\FrontOffice\Devel\X\EmailTest\EmailTest\Program.cs:line 14
Is there something special that needs to be done in a 64-bit environment?
Could you please tell us which version of Windows OS your are using along with .NET framework version and Aspose.Network dll version. We will try to test using the similar environment and will post the result/feedback here.
The environments I have tested with are Windows 2003 R2 (64-bit), Windows 2008 (64-bit) and Windows 2003 (32-bit). Only the last of these works without failing. The .NET framework is 2.0 in all cases and the Aspose.Network version is 4.8.0.5.
Could you please test the attached sample application in your 32/64 bit environments. I did tests on Windows 2003 Server 32 bit and 64 bit. It was able to send email without any problems. Please post the screenshot or exception message in case it fails.
I have tested the sample application and I get an error message “Failure sending mail”. I’ve run the app on a 32-bit environment with the same parameters and it works OK.
I also recompiled my own test app with the new DLLs and get the following stack:
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.
at Aspose.Network.Mail.SmtpClient.xd77ef5d42b5563e3(IEnumerator x74133ad33ffdf023, xe0a8a59934b83f35 xbef4c7a62a5d773b)
at Aspose.Network.Mail.SmtpClient.Send(MailMessage message)
— End of inner exception stack trace —
at Aspose.Network.Mail.SmtpClient.Send(MailMessage message)
The supplied DDL works correctly in the 64-bit environments. Does this mean that we will have to create separate builds for 32-bit and 64-bit deployments?
Hi, We are using Aspose.Network.dll 5.1.0.0 version. The version is .Net 3.5. I am getting the same issue with 64 bit environment.Message:Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
The attached version is 4.8.1.0 ad it is on 2.0 framework
Could you please help us with this? Do we need to have a different dll for 64 bit environment?
Thank you. This DLL appears to have solved the same 64-bit issues we were having.
Edit: The version on the DLL says “5.1.0.0”. Does this mean the DLL is a 64-bit version of v5.1 or it’s v5.2, but it’s not an official release so it doesn’t matter anyway?
Edit: The version on the DLL says "5.1.0.0". Does this mean the DLL is a 64-bit version of v5.1 or it's v5.2, but it's not an official release so it doesn't matter anyway?
This dll is actually version 5.2 that contains fixes to work for both 32 and 64 bit Operating Systems. You may check the version from Visual Studio properties or by right clicking it in Windows Explorer and then selecting properties --> Details.
We are again experiencing issues with the DLL (v5.8.0) when we make a call with MailMessage.Save in Windows Server 2008 R2 (64-bit). The same code works on Windows 7 (64-bit) and Windows XP.
Using the x64 version of the Aspose.Network.dll file removes the error, but from my understanding, the same DLL should have worked on both 32-bit and x64 systems (at least from version 5.2 onward).
Searching through this forum, it seems that there is conflicting information about 32-bit and 64-bit libraries. Some staff responses (usually for hotfixes) deliver a single DLL that works for both 32-bit and 64-bit OSs. Sometimes the response is to use the specific 64-bit version of the DLL. Can you clarify the appropriate DLLs to use. Will the 64-bit version have the same version/fixes as the 32-bit version? Thanks.
Also, there is specific .NET 3.5 versions of the DLL ... is it OK to use the .NET 2 version of ASPOSE DLL on an ASP.NET 3.5 application? Usually .NET 2 DLLs run fine on .NET 3.5.
Our production servers are x64 machines, but my development box is x86. The other day I accidentaly built our app with the x64 v5.8 Aspose.Network.dll and ran it on my local box. I was very surprised that I didn't get the BadImageFormatException. Not only did the code load, it even ran seemingly correctly on my x86 machine.
Are there any differences in the x86 and x64 bit builds of Aspose.Network?
Due to some issues, we are providing separate dlls for x86 and x64 systems. We recommend to use the corresponding dll for your platform.
The x64 dlls might work correctly on x86 systems, but we cannot guarantee that they provide the desired result, because they are built for x64 platform.
We are working on to provide same dll for both platforms, but until then, please use the corresponding dll for the platform (x86 dlls on x86 OS and x64 dlls for x64 OS).