470,636 Members | 1,431 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,636 developers. It's quick & easy.

System.Web

I have a program which has ran every night fine until last night. Now it
bombs with the following errors. I have also broke this down to its
simplest form for sending the mail
(http://support.microsoft.com/default...B;EN-US;314201) which gives
the same error. This server does not have any firewall software running on
it as it is the exchange server for the domain. I can also telnet smtp and
send mail using localhost, 127.0.0.1, machinename, and mx name. I have
copied the system.web.dll from a dev machine over to the running directory
and still same error msg. Any ideas?

SIMPLE FORM
----------------------------------------------------
Could not access 'CDO.Message' object.
Exception has been thrown by the target of an invocation.
The transport failed to connect to the server.


Unhandled Exception: System.Web.HttpException: Could not access
'CDO.Message' ob
ject. ---> System.Reflection.TargetInvocationException: Exception has been
throw
n by the target of an invocation. --->
System.Runtime.InteropServices.COMExcepti
on (0x80040213): The transport failed to connect to the server.

--- End of inner exception stack trace ---
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,
Bind
er binder, Object target, Object[] args, ParameterModifier[] modifiers,
CultureI
nfo culture, String[] namedParameters)
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
method
Name, Object[] args)
--- End of inner exception stack trace ---
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
method
Name, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at testmail.Module1.Main()
Nov 21 '05 #1
5 1219
"Bryan Martin" <sp******@online.nospam> schrieb:
Could not access 'CDO.Message' object.


Take a look at <URL:http://www.systemwebmail.net/>...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
Seen that article early in the troubleshooting process. As I stated before
most of the things described in the article have been tried.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uP**************@TK2MSFTNGP14.phx.gbl...
"Bryan Martin" <sp******@online.nospam> schrieb:
Could not access 'CDO.Message' object.


Take a look at <URL:http://www.systemwebmail.net/>...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
Hi

Based on my understanding, you can send the email with your localhost, that
is to say the SMTP service is OK. And the program will run OK for a long
time until recently it broke suddently. Also it seems that you have tried
the KB314201, I assume you run the KB code in a console applicaton under
the account with administrator rights. If not, you may have a try and let
me know the result, so that we can isolate the problem.

If I have any misunderstanding, please feel free to post here.

From the MSDN,

The System.Web.Mail namespace contains classes that enable you to construct
and send messages using the CDOSYS (Collaboration Data Objects for Windows
2000) message component. The mail message is delivered either through the
SMTP mail service built into Microsoft Windows 2000 or through an arbitrary
SMTP server. The classes in this namespace can be used from ASP.NET or from
any managed application.

That is to say the System.Web.Mail is the wrap for the CDOSYS.dll which is
located in the path below.
c:\WINDOWS\system32\cdosys.dll

From the error mesage, it seems that it has some error when the
System.Web.Mail call the cdosys.dll, or the cdosys.dll call the smtp
service.

To troubleshooting the problem, we may tried the following.
1. Try to move the code line below, so that the mail will be sent via the
localhost(please make sure first the local SMTP service will work)
SmtpMail.SmtpServer = "MySMTPServer"
2. Tried to run the code under administrators account in a console
application in case you have not done that.
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #4
To add insult to injury. This appears to be something between the dotnet
framework and exchange. I can change the smtpserver to an offsite smtp
server and the error goes away. I can telnet locally using 127.0.0.1,
hostname, mx name etc with success and no errors and no clients are
reporting errors sending mail. Server has been rebooted several times.
Still at a loss.
"Bryan Martin" <sp******@online.nospam> wrote in message
news:OX**************@TK2MSFTNGP12.phx.gbl...
I have a program which has ran every night fine until last night. Now it
bombs with the following errors. I have also broke this down to its
simplest form for sending the mail
(http://support.microsoft.com/default...B;EN-US;314201) which
gives
the same error. This server does not have any firewall software running
on
it as it is the exchange server for the domain. I can also telnet smtp
and
send mail using localhost, 127.0.0.1, machinename, and mx name. I have
copied the system.web.dll from a dev machine over to the running directory
and still same error msg. Any ideas?

SIMPLE FORM
----------------------------------------------------
Could not access 'CDO.Message' object.
Exception has been thrown by the target of an invocation.
The transport failed to connect to the server.


Unhandled Exception: System.Web.HttpException: Could not access
'CDO.Message' ob
ject. ---> System.Reflection.TargetInvocationException: Exception has been
throw
n by the target of an invocation. --->
System.Runtime.InteropServices.COMExcepti
on (0x80040213): The transport failed to connect to the server.

--- End of inner exception stack trace ---
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,
Bind
er binder, Object target, Object[] args, ParameterModifier[] modifiers,
CultureI
nfo culture, String[] namedParameters)
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
method
Name, Object[] args)
--- End of inner exception stack trace ---
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
method
Name, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at testmail.Module1.Main()

Nov 21 '05 #5
Hi

Based on my understanding, now you can send the mail by using
System.Web.Mail via the local SMTP service.
If I have any misunderstanding, please feel free to let me know.

If so, I think the problem is isloate to the problem that how to configure
in Exchange site so that we can send mail via the remote exchange server.
Because if we can send the mail via the local server, I think the code, the
System.Web.Mail and the CDOSYS.dll should be OK(one of these has corrupt
will cause the mail send failed)

So far I think you may try to send the mail by using the local smtp
client,(e.g. Outlook express to send the email via the remote the
exchange,NOTE: I don't mean the microsoft outlook(they connect to the
exchange server use other approach than the smtp)

Also for exchange configurate issue, I think you may try to post in the
newsgroup below.
microsoft.public.exchange
or
microsoft.public.exchange2000

Thanks for your understanding!

Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Terrence | last post: by
3 posts views Thread by Terrence | last post: by
5 posts views Thread by laks | last post: by
reply views Thread by NicK chlam via DotNetMonster.com | last post: by
???
reply views Thread by Stoney L | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.