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}
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}