MailEncoding.Base64 Corrupting .pdf Attachments

bugtesting

New Member
This is a strange one that has been hanging me up. When I am attempting to attach certain .pdf files in ASP.NET, it will corrupt the chart images giving me errors like: <BR><BR>There was an error processing a page. There was a problem reading this document (114)<BR>Insufficent Data for Image<BR>Illegal operation 'h' inside a text document<BR><BR>The text portion seems to come out fine though. This processes without error in our current delivery system running in ASP and the ASP.NET system doesn't seem to have this problem with other .pdf documents or other files. I'm thinking this issue must reside in the MailEncoding because when it set it to MailEncoding.UUEncode these error messages don't occur (other problems do arise though with the attachment getting stripped off and appended as trash at the end of the message when sent to certain mail accounts). I currently have it set as follows:<BR><BR>MailAttachment attach = new MailAttachment(strFilePath1, MailEncoding.Base64);<BR>objMessage.Attachments.Add(attach);<BR><BR>Any thoughts on why this corruption under Base64 might be occuring or any way to get around this? <BR><BR>Thanks<BR>-Mark
 
Back
Top