Could not access CDO.Message

J

James

I'm using System.Web.Mail to generate e-mails and I'm adding attachments.
When I add a ~300KB *.doc file, it works as expected. When I attached a 1.2
MB PDF File, I get the following exception:

Any thoughts?

? ex.InnerException

{System.Reflection.TargetInvocationException}

[System.Reflection.TargetInvocationException]:
{System.Reflection.TargetInvocationException}

HelpLink: Nothing

InnerException: {System.Runtime.InteropServices.COMException}

Message: "Exception has been thrown by the target of an invocation."

Source: "mscorlib"

StackTrace: " at System.RuntimeType.InvokeDispMethod(String name,
BindingFlags invokeAttr, Object target, Object[] args, Boolean[]
byrefModifiers, Int32 culture, String[] namedParameters)

at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifier[] modifiers,
CultureInfo culture, String[] namedParameters)

at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder
binder, Object target, Object[] args)

at System.Web.Mail.LateBoundAccessHelper.CallMethod(Type type, Object obj,
String methodName, Object[] args)

at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String
methodName, Object[] args)"

TargetSite: {System.Reflection.RuntimeMethodInfo}
 
A

Andrew Robinson

Is this possibly related to the max size for messages that is set in your
IIS SMTP server?

IIS Admin -> Default SMTP Virtual Server -> Properties -> Message Tab

The default on my Win Xp box is set at 10240K. You are exceeding that.

-Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top