473,563 Members | 2,805 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Could not access 'CDO.Message' object

Hi,

I'm using the System.Web.Mail class to send an e-mail from my ASP.Net
application, but when sending the e-mail, I'm getting the above error. It
seems to be because I have Office XP installed, and the version of CDO is
replaced by this installation. I haven't been able to find this error
anywhere on any MS site. Anyone have a clue on how to then actually send the
e-mail?

Thanks

Thys Brits
MCSD/MCAD
Jul 21 '05 #1
4 9269
Hi Thys,

Have you ever sent e-mail successfully with System.Web.Mail class before
you installed the Office XP?
Can you tell me if your smtp server used to send email need client
authentication, which may caused the problem, Since you can not set the
client authentication with the System.Web.Mail class?
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.

--------------------
From: "Thys Brits" <th**@jtsoftwar e.co.za>
Subject: Could not access 'CDO.Message' object
Date: Sun, 21 Sep 2003 17:57:41 +0200
Lines: 15
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <O1************ **@TK2MSFTNGP10 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.genera l
NNTP-Posting-Host: c5-pta-49.dial-up.net 196.33.244.49
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:109325
X-Tomcat-NG: microsoft.publi c.dotnet.genera l

Hi,

I'm using the System.Web.Mail class to send an e-mail from my ASP.Net
application, but when sending the e-mail, I'm getting the above error. It
seems to be because I have Office XP installed, and the version of CDO is
replaced by this installation. I haven't been able to find this error
anywhere on any MS site. Anyone have a clue on how to then actually send thee-mail?

Thanks

Thys Brits
MCSD/MCAD


Jul 21 '05 #2
Hi,

I added a reference to Microsoft CDO for Exchange library in my project, and
changed the code to use CDO.MessageClas s (and had to change a few
properties, including the Configuration.F ields). This works, although there
are no authentication properties set. I'm using my local SMTP server, and it
worked using the code below (the code is run in a web server control):

CDO.MessageClas s mail = new CDO.MessageClas s();
mail.Subject = "Record change";
mail.From = "te**@test.co.z a)";
mail.HTMLBody = "<HTML><Body><F ont Face=\"Arial\" Size=\"2\">";
mail.HTMLBody += "A change has been made to a record in the table <b>" +
strTable + "</b> by " + this.Page.Sessi on["UserName"] + ".<br>";
string sURL = this.Page.Reque st.Url.ToString ();
mail.HTMLBody += "<p>To view the change(s), visit the website at <A href=\""
+ sURL + "\">" + sURL + "</a>.";
mail.HTMLBody += "</Font></Body></HTML>";
mail.BCC = "te**@test.co.z a";
mail.To = recip.Substring (0, recip.Length - 1); //recip is a string
containing all the recipients
mail.Configurat ion.Fields["http://schemas.microso ft.com/cdo/configuration/se
ndusing"].Value = 2;
mail.Configurat ion.Fields["http://schemas.microso ft.com/cdo/configuration/sm
tpserverport"].Value = 25;
if(this.Page.Ap plication["MailServer "] != null)
{

mail.Configurat ion.Fields["http://schemas.microso ft.com/cdo/configuration/sm
tpserver"].Value = this.Page.Appli cation["MailServer "].ToString();
}
mail.Configurat ion.Fields.Upda te();
mail.Send();

I haven't tried sending mail before installing Office XP, the only reason I
thought it might be this, is because I found an article on MS website saying
that Office XP replaces the CDO library, and replaces the reference to it in
the registry. Any further ideas?

Thys Brits

PS - I should warn everyone - don't post with your real e-mail address -
since posting my original message, I've been spammed with these stupid
"Microsoft Update" virus e-mails - I've received about 30 in the last 18
hours.... MS should find these people and sue them for identity theft, etc,
etc, etc....

"Peter Huang [MSFT]" <v-******@online.m icrosoft.com> wrote in message
news:Pq******** ******@cpmsftng xa06.phx.gbl...
Hi Thys,

Have you ever sent e-mail successfully with System.Web.Mail class before
you installed the Office XP?
Can you tell me if your smtp server used to send email need client
authentication, which may caused the problem, Since you can not set the
client authentication with the System.Web.Mail class?
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.

--------------------
From: "Thys Brits" <th**@jtsoftwar e.co.za>
Subject: Could not access 'CDO.Message' object
Date: Sun, 21 Sep 2003 17:57:41 +0200
Lines: 15
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <O1************ **@TK2MSFTNGP10 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.genera l
NNTP-Posting-Host: c5-pta-49.dial-up.net 196.33.244.49
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:109325
X-Tomcat-NG: microsoft.publi c.dotnet.genera l

Hi,

I'm using the System.Web.Mail class to send an e-mail from my ASP.Net
application, but when sending the e-mail, I'm getting the above error. It
seems to be because I have Office XP installed, and the version of CDO is
replaced by this installation. I haven't been able to find this error
anywhere on any MS site. Anyone have a clue on how to then actually send

the
e-mail?

Thanks

Thys Brits
MCSD/MCAD

Jul 21 '05 #3
For those of you who were wondering about this, I found the solution. It's a
permissions problem. I added the following code at the top of my class, and
it worked!

using System.Security .Permissions;
[assembly:Permis sionSetAttribut e(SecurityActio n.RequestMinimu m, Name =
"LocalIntranet" )]

Thys Brits
MCSD/MCSD.Net

"Thys Brits" <th**@jtsoftwar e.co.za> wrote in message
news:%2******** *******@tk2msft ngp13.phx.gbl.. .
Hi,

I added a reference to Microsoft CDO for Exchange library in my project, and changed the code to use CDO.MessageClas s (and had to change a few
properties, including the Configuration.F ields). This works, although there are no authentication properties set. I'm using my local SMTP server, and it worked using the code below (the code is run in a web server control):

CDO.MessageClas s mail = new CDO.MessageClas s();
mail.Subject = "Record change";
mail.From = "te**@test.co.z a)";
mail.HTMLBody = "<HTML><Body><F ont Face=\"Arial\" Size=\"2\">";
mail.HTMLBody += "A change has been made to a record in the table <b>" +
strTable + "</b> by " + this.Page.Sessi on["UserName"] + ".<br>";
string sURL = this.Page.Reque st.Url.ToString ();
mail.HTMLBody += "<p>To view the change(s), visit the website at <A href=\"" + sURL + "\">" + sURL + "</a>.";
mail.HTMLBody += "</Font></Body></HTML>";
mail.BCC = "te**@test.co.z a";
mail.To = recip.Substring (0, recip.Length - 1); //recip is a string
containing all the recipients
mail.Configurat ion.Fields["http://schemas.microso ft.com/cdo/configuration/se ndusing"].Value = 2;
mail.Configurat ion.Fields["http://schemas.microso ft.com/cdo/configuration/sm tpserverport"].Value = 25;
if(this.Page.Ap plication["MailServer "] != null)
{

mail.Configurat ion.Fields["http://schemas.microso ft.com/cdo/configuration/sm tpserver"].Value = this.Page.Appli cation["MailServer "].ToString();
}
mail.Configurat ion.Fields.Upda te();
mail.Send();

I haven't tried sending mail before installing Office XP, the only reason I thought it might be this, is because I found an article on MS website saying that Office XP replaces the CDO library, and replaces the reference to it in the registry. Any further ideas?

Thys Brits

PS - I should warn everyone - don't post with your real e-mail address -
since posting my original message, I've been spammed with these stupid
"Microsoft Update" virus e-mails - I've received about 30 in the last 18
hours.... MS should find these people and sue them for identity theft, etc, etc, etc....

"Peter Huang [MSFT]" <v-******@online.m icrosoft.com> wrote in message
news:Pq******** ******@cpmsftng xa06.phx.gbl...
Hi Thys,

Have you ever sent e-mail successfully with System.Web.Mail class before
you installed the Office XP?
Can you tell me if your smtp server used to send email need client
authentication, which may caused the problem, Since you can not set the
client authentication with the System.Web.Mail class?
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.
--------------------
From: "Thys Brits" <th**@jtsoftwar e.co.za>
Subject: Could not access 'CDO.Message' object
Date: Sun, 21 Sep 2003 17:57:41 +0200
Lines: 15
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <O1************ **@TK2MSFTNGP10 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.genera l
NNTP-Posting-Host: c5-pta-49.dial-up.net 196.33.244.49
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:109325
X-Tomcat-NG: microsoft.publi c.dotnet.genera l

Hi,

I'm using the System.Web.Mail class to send an e-mail from my ASP.Net
application, but when sending the e-mail, I'm getting the above error. Itseems to be because I have Office XP installed, and the version of CDO isreplaced by this installation. I haven't been able to find this error
anywhere on any MS site. Anyone have a clue on how to then actually
send the
e-mail?

Thanks

Thys Brits
MCSD/MCAD


Jul 21 '05 #4
senani28
1 New Member
Hi , can somebody tell me the solution for VB.NET
Jul 3 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
91028
by: Janna Deegan | last post by:
Hello all, First off, if there is a better place to post for an answer to this question, please feel free to point me there. I have some very strange behavior happening with my System.web.mail objects. I was able to run my application fine for roughly 1500 email messages. The next time I tried sending mail, it stopped working with the...
2
7258
by: Desmond | last post by:
Hi, I would really appreciate if somebody could give some advise on this. I've a ASP.NET application that is supposed to send emails and it is tested to be working well on IIS 5.0 and tested working in .NET Framework 1.0/1.1. Recently this is ported over to IIS 6.0 using .NET Framework 1.1 and the error "Could Not Access CDO.Message...
1
2690
by: Jens Øster | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send e-mail addresses out side my company walls. When the e-mail is send on some one in my company it works perfect. I think it is a relay issue. Our...
3
9246
by: Jens | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send e-mail addresses out side my company walls. When the e-mail is send on some one in my company it works perfect. I think it is a relay issue. Our...
1
2427
by: Michael | last post by:
Hello, I've read a lot of threads on this subject, but they typically go back to a problem with the smtp server configuration. In my case, everything works great until I uncomment the one line below. Once I set the BodyFormat to MailFormat.Html then I get: HttpException (0x80004005): Could not access 'CDO.Message' object Otherwise,...
4
3962
by: Liz Patton | last post by:
Here's the exception: System.Exception: Unable to send mail: Could not access 'CDO.Message' object. ---> 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 (0x80004005):...
2
372
by: MattB | last post by:
I've taken some working code from a vb clas library that was a part of a web application and put it into a stand alone class library so I can reuse it from other applications. I'm using some code (pasted below) to send email that uses the mail.mailmessage object. It compiles ok, and debugs ok until the mail is supposed to be sent and it throws...
3
2574
by: Anthony Fine | last post by:
Hello All, I have a VB.Net app that needs to send mail. I have created a class for building my e-mail, but keep getting the error (Could not access 'CDO.Message' object.) when trying to send it. I can successfully send an e-mail when I use the CreateObject("CDO.Message") method, but it fails when trying to send using VB.Net. My code is...
3
356
by: Thys Brits | last post by:
Hi, I'm using the System.Web.Mail class to send an e-mail from my ASP.Net application, but when sending the e-mail, I'm getting the above error. It seems to be because I have Office XP installed, and the version of CDO is replaced by this installation. I haven't been able to find this error anywhere on any MS site. Anyone have a clue on how...
0
7665
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7642
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1200
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.