E
Erwan
I have a strange (but very blocking) result when using the smtpmail
class from an ASPX page :
here is the (very simple !) code...
'--------------------------------------------------
mail.To = "(e-mail address removed)"
mail.From = "(e-mail address removed)"
mail.Subject = "test envoi de mail"
mail.Body = "test envoi de mail"
System.Web.Mail.SmtpMail.SmtpServer = "localhost"
System.Web.Mail.SmtpMail.Send(mail)
'--------------------------------------------------
.... and here is the error message :
'--------------------------------------------------
Error loading type library/DLL.
Exception Details: System.Runtime.InteropServices.COMException: Error
loading type library/DLL.
Stack Trace:
[COMException (0x80029c4a): Error loading type library/DLL.]
[TargetInvocationException: Exception has been thrown by the target of
an invocation.]
System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers,
Int32 culture, String[] namedParameters) +0
System.RuntimeType.InvokeMember(String name, BindingFlags
invokeAttr, Binder binder, Object target, Object[] args,
ParameterModifier[] modifiers, CultureInfo culture, String[]
namedParameters) +468
System.Web.Mail.CdoSysHelper.Send(MailMessage message) +1195
System.Web.Mail.SmtpMail.Send(MailMessage message) +150
ASP.testmail_aspx.Page_Load(Object sender, EventArgs e) in
F:\OpenPortal Test\site\OpDotNet\testmail.aspx:13
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
'--------------------------------------------------
I have this error only on one server, the production one... it works
fine on my dev and test servers. Here are the configs of the 4 servers
:
- DEV
windows 2003 server US, framework 1.1, office 2003 with outlook
- TEST1
windows 2003 server US, framework 1.1, office 2003 with outlook
- TEST2
windows 2000 server US, framework 1.1
- PROD2 (doesn't work)
windows 2000 server US, framework 1.1, office 2003 with outlook
I tried to put the ASPNET user in the Administrators group, but it
didn't change anything. I also tried to add an identity
impersonate="true" in the web.config, so that the user is now
IUSR_machine, and the error message is now different :
'--------------------------------------------------
Access is denied.
Exception Details: System.UnauthorizedAccessException: Access is
denied.
'--------------------------------------------------
Anyone has an idea ? I have found nothing in the groups nor in the
Microsoft KB... but it seems to be in relation with the CDOSYS
library...
class from an ASPX page :
here is the (very simple !) code...
'--------------------------------------------------
mail.To = "(e-mail address removed)"
mail.From = "(e-mail address removed)"
mail.Subject = "test envoi de mail"
mail.Body = "test envoi de mail"
System.Web.Mail.SmtpMail.SmtpServer = "localhost"
System.Web.Mail.SmtpMail.Send(mail)
'--------------------------------------------------
.... and here is the error message :
'--------------------------------------------------
Error loading type library/DLL.
Exception Details: System.Runtime.InteropServices.COMException: Error
loading type library/DLL.
Stack Trace:
[COMException (0x80029c4a): Error loading type library/DLL.]
[TargetInvocationException: Exception has been thrown by the target of
an invocation.]
System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers,
Int32 culture, String[] namedParameters) +0
System.RuntimeType.InvokeMember(String name, BindingFlags
invokeAttr, Binder binder, Object target, Object[] args,
ParameterModifier[] modifiers, CultureInfo culture, String[]
namedParameters) +468
System.Web.Mail.CdoSysHelper.Send(MailMessage message) +1195
System.Web.Mail.SmtpMail.Send(MailMessage message) +150
ASP.testmail_aspx.Page_Load(Object sender, EventArgs e) in
F:\OpenPortal Test\site\OpDotNet\testmail.aspx:13
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
'--------------------------------------------------
I have this error only on one server, the production one... it works
fine on my dev and test servers. Here are the configs of the 4 servers
:
- DEV
windows 2003 server US, framework 1.1, office 2003 with outlook
- TEST1
windows 2003 server US, framework 1.1, office 2003 with outlook
- TEST2
windows 2000 server US, framework 1.1
- PROD2 (doesn't work)
windows 2000 server US, framework 1.1, office 2003 with outlook
I tried to put the ASPNET user in the Administrators group, but it
didn't change anything. I also tried to add an identity
impersonate="true" in the web.config, so that the user is now
IUSR_machine, and the error message is now different :
'--------------------------------------------------
Access is denied.
Exception Details: System.UnauthorizedAccessException: Access is
denied.
'--------------------------------------------------
Anyone has an idea ? I have found nothing in the groups nor in the
Microsoft KB... but it seems to be in relation with the CDOSYS
library...