从3.5升级我的.NET Framework 4.0后,我最近有一个问题:
I recently had an issue after upgrading my .net framework to 4.0 from 3.5:
System.Net.Mail.SmtpException:失败发送邮件。 ---> System.IndexOutOfRangeException:索引是该数组的范围之外。在System.Net.Base64Stream.En codeBytes(字节[]缓冲区的Int32偏移的Int32算,布尔dontDeferFinalBytes,布尔shouldAppendSpaceToCRLF)在System.Net.Base64Stream.Write(字节[]缓冲区的Int32偏移的Int32计数)在System.Net.Mime.MimePart.Send(BaseWriter作家)在System.Net.Mime.MimeMultiPart.Send(BaseWriter作家)在System.Net.Mail.Message.Send(BaseWriter作家,布尔sendEnvelope)在System.Net。 Mail.SmtpClient.Send(MailMessage消息)---内部异常堆栈跟踪的结尾---
System.Net.Mail.SmtpException: Failure sending mail. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Net.Base64Stream.EncodeBytes(Byte[] buffer, Int32 offset, Int32 count, Boolean dontDeferFinalBytes, Boolean shouldAppendSpaceToCRLF) at System.Net.Base64Stream.Write(Byte[] buffer, Int32 offset, Int32 count) at System.Net.Mime.MimePart.Send(BaseWriter writer) at System.Net.Mime.MimeMultiPart.Send(BaseWriter writer) at System.Net.Mail.Message.Send(BaseWriter writer, Boolean sendEnvelope) at System.Net.Mail.SmtpClient.Send(MailMessage message) --- End of inner exception stack trace ---
我看了这个连接错误列表在这里:http://connect.microsoft.com/VisualStudio/feedback/details/544562/cannot-send-e-mails-with-large-attachments-system-net-mail-smtpclient-system-net-mail-mailmessage.
I read this connect bug listing here: http://connect.microsoft.com/VisualStudio/feedback/details/544562/cannot-send-e-mails-with-large-attachments-system-net-mail-smtpclient-system-net-mail-mailmessage.
如果任何人都关心这个问题,请投票支持它连接,所以这将是迟早固定的。
If anyone cares about this issue, please vote for it on Connect, so it will be fixed sooner.
该缺陷已修补:https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=30226
标题:KB2183292
Title: KB2183292
发布日期:2010年7月21日
Release Date: 7/21/2010
尺寸:8.58 MB
版本:修复
类别:构建
说明 QFE:System.Net.Mail - SmtpClient类抛出,如果文件附件是例外>超过3MB
Description QFE: System.Net.Mail - SmtpClient class throws exceptions if file attachment is > over 3MB
上一篇:有没有更好的方式来修剪一个DateTime到一个特定的precision?方式、DateTime、precision
下一篇:System.ExecutionEngineException失败System、ExecutionEngineException