Random error while sending email "Could not access 'CDO.Message' object"

Hi,

 

The environment is Windows 2000 Advanced Server SP4. MS Exchange 2000. 
I am maintaining an existing ASP.NET 1.1 web application that sends emails using the MailMessage and the SMTPMail classes. Exchange has been setup for relaying, authentication, and port. The only thing i am setting on the SMTPMail class is SmtpServer property to which I have tried using the server name and the I.P.

Problem is real strange, it most cases, I would say 95% of the time, there are no errors with the sending of emails, however on rare occasions like once a couple of months an error will occur. The email addresses are valid and the mail server is working and i get this error.

 
Could not access 'CDO.Message' object. And the inner exception is: The transport failed to connect to the server 

Actual logged exception:

System.Web.HttpException: Could not access 'CDO.Message' object.
System.Reflection.TargetInvocationException: Exception has been thrown by the
target of an invocation. ---> System.Runtime.InteropServices.COMException
(0x80040213): The transport failed to connect to the server

 
There are many articles online about this CDO.Message object problem but none fits my inner exception of  "The transport failed to connect to the server".

Can some one suggest any thing for this problem. The main problem here is the bug is not reproducible and any change I made needs a few weeks to know if any errors are still being logged. So any suggestions are welcome.

 

Thanks

Jim 


 

0
jimmy
9/14/2007 2:57:17 AM
asp.net.web-forms 93655 articles. 5 followers. Follow

3 Replies
633 Views

Similar Articles

[PageSpeed] 29

Hi

I got this problem before. It was cause by unstable network. The network could be unavaliable for couple of seconds. you might just catch it.

0
dingwanyou
9/14/2007 3:44:00 AM

dingwanyou:

Hi

I got this problem before. It was cause by unstable network. The network could be unavaliable for couple of seconds. you might just catch it.

 

 

Thanks for the reply.

Can you explain what you mean by unstable network?

At first I thought it could be a random DNS issue so i got the clients to use the I.P. address but the problem still occurs.

The client is adamant it is not a network issue. Is there any way for me to prove this definitively? 

0
jimmy
9/14/2007 5:15:23 AM

Now this bug is getting me real annoyed. It has surfaced again and like I mentioned before, the client reports this problem like 5% of the time out of all emails being sent using the .NET 1.1 System.Web.Mail class. Because we cannot reproduce the problem there is no way for me to debug this. After weeks of googling for the possible problem I have read a few articles suggesting that the .NET 1.1 Mail classes are error prone because it is using unmanaged resources like CDONT and CDOSYS which are COM components.

I am now at a stage where I am looking into 3rd party mail components. Would you think this would solve my random problem? The last thing I want to do is to fork out $1000's for a component that may or may not fix the issue. The problem is even with the new component I do not know how to reproduce the problem as it is a random issue. Any suggestions?

I am looking into a commercial product called AspNetMail at this time and am wondering does any one have anything to say about this product or can recommend another product? or even better help me resolve this issue.

I am willing to use open source products as well as long as they have been through alot of testing and would not break.

 

Thanks
 Jim

0
jimmy
10/3/2007 9:29:35 AM
Reply:

Similar Artilces:

Error when I try to send an email
I've got some very basic code to send an email and I'm getting an error that's rather odd. To my understanding, CDO is the base data object in the SmtpMail class. So does this mean it's unsuccessfully accessing the MailMessage object I'm passing in? Does this mean that I don't have SMTP on my box ('cause I don't) but the Smtp object is pointing to a vaild mail server. Any help you can provide would be greatly appreciated. string strBody = ""; MailMessage BidRequest = new MailMessage(); //System.Web.HttpCookie formData = new System.Web.HttpCookie("Request_Bid...

"Could not access 'CDO.Message' object" while trying to send HTML message.
well, this bit of code worked great until recently.  I have not seen any issues on my web server, but this is definately an issue on my XP Pro (sp2) box with ISS Virtual SMTP server installed.  The box is fully patched. My problem is that i am unable to send an HTML email.  If i change BodyFormat to "MailFormat.Text" it will work fine.  Here's the exception: System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices....

Couldn't Send Mail from DNN "Could not access 'CDO.Message' object."
Hello, I've currently been dealing with a problem of DNN 3.1.1 (clean install) being unable to send/test smtp settings.  The test button gives the message  Could not access 'CDO.Message' object.  I've gotten this message on two completely different servers, both clean installs.  Both servers have IIS SMTP installed and configured.  I am able to send test messages via php and all works great, but from asp.net/DNN 3.1.1 I seem to be unable to send messages.  I've tried multiple SMTP servers, and all of them seem to show no connection attempt even being made to it....

why the eroor caused "can't access 'CDO.Message' object" when I am sending mail?
 I trid 30 times , it only success 3 times almost of time , shows  cant access 'CDO.Message' object?why?my code is below                MailMessage MObj = new MailMessage();                System.Text.StringBuilder sb = new System.Text.StringBuilder();                sb.Append("UserNameļ¼š " + Name ) ;                sb.Append(&qu...

Email Problem: "Could not access 'CDO.Message' object."
Hallo! I got problem with sending email. I am getting this error message when trying to send mail:"Could not access 'CDO.Message' object." I am only getting the message when the page has been uploaded to the host. On my pc it is sending the mail and everything, but not online! Help! Here is the code that i am using:Imports System.Web.Mail Dim obj As System.Web.Mail.SmtpMail Dim Mailmsg As New System.Web.Mail.MailMessage Private Sub Mailer(ByVal EmailAd As String, ByVal Message As String) Try obj.SmtpServer = "smtp.saix.net" Mailm...

SMTPMail error: "Could not access 'CDO.Message' object."
It seems this error is new since installing the 1.1 framework. The code was running just fine before. Here's the code...standared stuff...SMTPServer is defined in the web.config file as 'localhost' and details.email is the user's email pulled from the database. It's getting properly populated. //Construct message MailMessage msg = new MailMessage(); msg.BodyFormat = MailFormat.Html; msg.From = "admin@mydomain.com"; msg.To = details.email; msg.Subject = "New User Profile Info from mydomain.com"; msg.Body = emailDetails; //send message SmtpMai...

Changing content of body causes "Could not access 'CDO.Message' object" error?
Hello all,I recently ran into an error that's puzzling me quite a bit.  Basically, I'm utilzing the "Application_Error" method in the Global.asax file to catch Unhandled errors, and send me an email when they occur.  So, I tried to stuff a bunch of other stuff that would be helpful into that email as well, but it seems to be causing the "Could not access 'CDO.Message' object" to occur. Examples will probably help explain this better.  So, this works: protected void Application_Error(Object sender, EventArgs e)    &nb...

Help!!! I have errors "Compiler Error Message: BC30389: 'C' is not accessible in this context because it is 'Private'."
Hi guys! Pls. help me with this one. I know this is very simple and easy for you. i'm just stuck in here for almost two days. I just can't solve this error. Pls reply. Tnx! =) Server Error in '/WebApplication1' Application. -------------------------------------------------------------------------------- Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. hi guys! i'm new in using Crystal Report .Net and I jus...

Please Help ! "Could not access 'CDO.Message' object" How to resolve ?
An unhandled exception of type 'System.Web.HttpException' occurred in system.web.dll Additional information: Could not access 'CDO.Message' object. You need to specify your SmtpMail.SmtpServer. Steven BeyRecursion: see Recursion You also should make sure you have an SMTP server running. SmtpServer is assigned the name as below: SmtpMail.SmtpServer = "smtprelay.companyname.com" ----> cannot work i change it to my local server as below SmtpMail.SmtpServer = "localhost" ------Cannot work also. at the same, the SMTP service on my local s...

Problem for setting up the SMTP-Server : "Could not access 'CDO.Message' object. "
On all of my DNN installations I get this message when I try to setup the SMTP-Server : Could not access 'CDO.Message' object. Thank you very much for any help! Regards, Fabian Is this local or remote?  My initial guess is you are not using the proper smtp server or you do not have relay setup for that machine.  Firewall issues can also cause you headaches.  Review your smtp requirements and adjust your host settings accordingly.Chris Paterra Fabian, something that's bit me on my development computer more than once is that I forget to change the Host Email a...

Sending email, but get the error : could not access "CDO.Message" object
Hi, I use .NET component to write an email sending component. I set the SmtpServer to an internet SMTP server which is used in my outlook express. When I send the email, I got the following error: could not access "CDO.Message" object what is the reason? How to solve? Thank you in advance. You are most likely not authenticating to the SMTP server....

"Compilation Error Compiler Error Message: BC30002: Type "'ws.Email' is not defined." after webservice request.
Hi,  I created a Webservice, which sends emails of a filled form. Offline I have no problems to get it to work, but when I put my website online I get "Compilation Error Compiler Error Message: BC30002: Type "'ws.Email'  is not defined." It seems it can't find the webservice anymore, although I added the webreference (which worked fine) before I put the website online (with dir App_WebReferences -> ws -> Email.wsdl,...)  This is the code which requests the webrequest:Dim SendEmail As New ws.Email() SendEmail.Send_Mail(code, 2, TextB...

.NET Error Message "Server Error in '/' Application."
I continue to get this error message randomly for several .NET applications and I'm trying to determine if this issue is "Permissions" or "Application Configuration" related.  What are the necessary NTFS security groups and rights that should be applied to the file directories?  Or what is the resolution to resolving this complex problem? HELP! moblack29   The first step is posting the full error message. JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue....

Error
Hi  I have not worked in ASP.NET for quite a few months now... and it really shows. Desinging new simple site - nicked some of my old code. I think I must have totally forgotten a few crucial bits here and there. Code below:<%@ Page Language="VB" AutoEventWireup="false" MasterPageFile="~/change_master.master" MaintainScrollPositionOnPostBack ="true" %> <asp:Content ID="mycontent" ContentPlaceHolderID="master_placeholder" Runat="Server"> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> </asp:Content>  Imports system.Diag...

Web resources about - Random error while sending email "Could not access 'CDO.Message' object" - asp.net.web-forms

Resources last updated: 12/25/2015 6:07:31 PM