Invalid Mail Attachment in ASP.NET Version 1.0

Annequeaccupe

New Member
I switched over from Beta 2 to Version 1 Friday and I found when using the following syntax to add an attachment:<BR><BR>objMessage.Attachments.Add(new MailAttachment(txtFilePath.Value));<BR><BR>I get the following error message:<BR><BR>Invalid mail attachment 'C:outlook.xml'. <BR>Line 137: if(txtFilePath.Value != "")<BR>Line 138: {<BR>Line 139: objMessage.Attachments.Add(new MailAttachment(txtFilePath.Value));<BR>Line 140: }<BR>Line 141: <BR>[HttpException (0x80004005): Invalid mail attachment 'C:outlook.xml'.]<BR><BR>This was working under Beta 2 fine and I've seen numerous examples using this as the proper way to include an attachment. Is anyone aware if there were updates made to this for version 1?<BR><BR>Thanks<BR>-Mark<BR>Upon further research, it is allowing some documents to attach while not others. I successfully attached a document at c:odbconf.log, but when trying to attach c:outlook.xml or c:Documents and SettingsmarkMy Documentsguid.asp I'm getting the error referenced above. Any thoughts why it would let some documents attach and not others? <BR><BR>Thanks<BR>-Mark
 
Back
Top