473,666 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Could not create 'CDO.Message' object

Hi,

I am trying to figure out why I get the following error when I try to send
a mail from an ASP.NET (1.1) application. When I use the same code from a
Windows exe then the code works perfectly, so I suppose that is has something
to do with security settings for IIS or SMTP Server.

Can anybody help me, because I am getting desperate. I have also looked it
up on the web but I get a lot of stuff that I have tried but none of the
solutions helped.

Code:
SmtpMail.SmtpSe rver = "localhost" ;
SmtpMail.Send(" te**@nospam.com ", "te**@nospam.co m", "Test", "Test");

Exceprion information:
System.Web.Http Exception: Could not create 'CDO.Message' object. at
System.Web.Mail .LateBoundAcces sHelper.get_Lat eBoundType() at
System.Web.Mail .LateBoundAcces sHelper.CreateI nstance() at
System.Web.Mail .CdoSysHelper.S end(MailMessage message) at
System.Web.Mail .CdoSysHelper.S end(String from, String to, String subject,
String messageText) at
System.Web.Mail .SmtpMail.Send( String from, String to, String subject, String
messageText) at
Test.WebForm1.P age_Load(Object sender, EventArgs e) in
c:\projects\tes t\webform1.aspx .cs:line 28
Mar 27 '06 #1
5 2582
You're not the first!
System.Web.Mail , Oh My!
http://www.systemwebmail.com/
Complete FAQ for sending email in ASP.NET (or trying to) with
System.Web.Mail

Highly recommended

"Alain" <al***@nospam.c om> wrote in message
news:4e******** *************** ***@news.micros oft.com...
Hi,

I am trying to figure out why I get the following error when I try to send
a mail from an ASP.NET (1.1) application. When I use the same code from a
Windows exe then the code works perfectly, so I suppose that is has
something to do with security settings for IIS or SMTP Server.

Can anybody help me, because I am getting desperate. I have also looked it
up on the web but I get a lot of stuff that I have tried but none of the
solutions helped.
Code:
SmtpMail.SmtpSe rver = "localhost" ;
SmtpMail.Send(" te**@nospam.com ", "te**@nospam.co m", "Test", "Test");

Exceprion information:
System.Web.Http Exception: Could not create 'CDO.Message' object. at
System.Web.Mail .LateBoundAcces sHelper.get_Lat eBoundType() at
System.Web.Mail .LateBoundAcces sHelper.CreateI nstance() at
System.Web.Mail .CdoSysHelper.S end(MailMessage message) at
System.Web.Mail .CdoSysHelper.S end(String from, String to, String subject,
String messageText) at System.Web.Mail .SmtpMail.Send( String from, String
to, String subject, String messageText) at Test.WebForm1.P age_Load(Object
sender, EventArgs e) in c:\projects\tes t\webform1.aspx .cs:line 28

Mar 27 '06 #2
Check my blog:
http://spaces.msn.com/sholliday/ 2/8/2006 entry

I have code for the different authentication methods pre-packaged.

Also.

Check your wwwroot/email/queue (I think thats the one(?)).... and see if
items are getting stuck there.

if so, do a google search for "smart host"
"Alain" <al***@nospam.c om> wrote in message
news:4e******** *************** ***@news.micros oft.com...
Hi,

I am trying to figure out why I get the following error when I try to send
a mail from an ASP.NET (1.1) application. When I use the same code from a
Windows exe then the code works perfectly, so I suppose that is has something to do with security settings for IIS or SMTP Server.

Can anybody help me, because I am getting desperate. I have also looked it
up on the web but I get a lot of stuff that I have tried but none of the
solutions helped.

Code:
SmtpMail.SmtpSe rver = "localhost" ;
SmtpMail.Send(" te**@nospam.com ", "te**@nospam.co m", "Test", "Test");

Exceprion information:
System.Web.Http Exception: Could not create 'CDO.Message' object. at
System.Web.Mail .LateBoundAcces sHelper.get_Lat eBoundType() at
System.Web.Mail .LateBoundAcces sHelper.CreateI nstance() at
System.Web.Mail .CdoSysHelper.S end(MailMessage message) at
System.Web.Mail .CdoSysHelper.S end(String from, String to, String subject,
String messageText) at
System.Web.Mail .SmtpMail.Send( String from, String to, String subject, String messageText) at
Test.WebForm1.P age_Load(Object sender, EventArgs e) in
c:\projects\tes t\webform1.aspx .cs:line 28

Mar 27 '06 #3
Hello,

I have experimented some more but I can't even get mails send to localhost.
I should expect that they are dropped in the queue folder but the only thing
I get (even when using SmtpMail.SmtpSe rver.Insert(0, "localhost" )) is that
annoying error message "Could not create 'CDO.Message' object".

On the PC of my co-worker the code works fine and when I use a windows exe.
Maybe there is a configuration issue. I am getting pretty tired of it!
Hi,

I am trying to figure out why I get the following error when I try to
send a mail from an ASP.NET (1.1) application. When I use the same
code from a Windows exe then the code works perfectly, so I suppose
that is has something to do with security settings for IIS or SMTP
Server.

Can anybody help me, because I am getting desperate. I have also
looked it up on the web but I get a lot of stuff that I have tried but
none of the solutions helped.

Code:
SmtpMail.SmtpSe rver = "localhost" ;
SmtpMail.Send(" te**@nospam.com ", "te**@nospam.co m", "Test", "Test");
Exceprion information:
System.Web.Http Exception: Could not create 'CDO.Message' object. at
System.Web.Mail .LateBoundAcces sHelper.get_Lat eBoundType() at
System.Web.Mail .LateBoundAcces sHelper.CreateI nstance() at
System.Web.Mail .CdoSysHelper.S end(MailMessage message) at
System.Web.Mail .CdoSysHelper.S end(String from, String to, String
subject,
String messageText) at
System.Web.Mail .SmtpMail.Send( String from, String to, String subject,
String
messageText) at
Test.WebForm1.P age_Load(Object sender, EventArgs e) in
c:\projects\tes t\webform1.aspx .cs:line 28

Mar 27 '06 #4
Hello Stuart,

I even tried this solution from Microsoft Support and it dodn't work for me:

This is the response i received from Microsoft:

Thank you for contacting Microsoft Developer Support. My name is Duke, and
I will be assisting you with this Service Request. In your case, you've indicated
you met the error "Could not create 'cdo.message' object" while using the
System.Web.Mail .SmtpMail object to send mail. You try to re-register the
file cdosys.dll but failed with the error 0x800704da. We shall be working
to resolve this specific issue through the course of the case. If I have
misunderstood your concern, please let me know. Based on my research and
experience, there are several versions of CDO, which may not be able to coexist
on the same machine. For more details regarding the CDO versions, please
refer to:

Title: Collaboration Data Objects Roadmap
URL: http://msdn.microsoft.com/library/en...do_roadmap.asp
In order to resolve the issue, you can find the CDO file current registered,
un-register it, and then re-register the file CDOSYS.DLL.

In order to find/un-register the CDO file current registered, you may refer
to the following steps:

1. Launch Regedt32.exe from “Start” -> “Run”.
2. Navigate to HKEY_CLASSES_RO OT\CDO.xxxxxx (CDO.xxxxxx represents a
registry item, i.e. CDO.Address), copy down the default value of the key
CLSID (i.e. {CD000110-8B95-11D1-82DB-00C04FB1625D}).
3. Navigate to HKEY_CLASSES_RO OT\CLSID\{xxxxx xxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
(Note: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} represents the value got in
step 2.)
4. The default value of the sub-key “InprocServer 32” is the path of
the target file.
5. Un-register the file with the command line “Regsvr32 -u xxxxx.dll”.

After un-registering the file, you can try to register the file CDOSYS.DLL
again, and it should work fine.

If you have any concerns regarding the above, please feel free to contact
me. I’ll be glad to be of assistance.
You're not the first!
System.Web.Mail , Oh My!
http://www.systemwebmail.com/
Complete FAQ for sending email in ASP.NET (or trying to) with
System.Web.Mail
Highly recommended

"Alain" <al***@nospam.c om> wrote in message
news:4e******** *************** ***@news.micros oft.com...
Hi,

I am trying to figure out why I get the following error when I try to
send a mail from an ASP.NET (1.1) application. When I use the same
code from a Windows exe then the code works perfectly, so I suppose
that is has something to do with security settings for IIS or SMTP
Server.

Can anybody help me, because I am getting desperate. I have also
looked it
up on the web but I get a lot of stuff that I have tried but none of
the
solutions helped.
Code:
SmtpMail.SmtpSe rver = "localhost" ;
SmtpMail.Send(" te**@nospam.com ", "te**@nospam.co m", "Test", "Test");
Exceprion information:
System.Web.Http Exception: Could not create 'CDO.Message' object. at
System.Web.Mail .LateBoundAcces sHelper.get_Lat eBoundType() at
System.Web.Mail .LateBoundAcces sHelper.CreateI nstance() at
System.Web.Mail .CdoSysHelper.S end(MailMessage message) at
System.Web.Mail .CdoSysHelper.S end(String from, String to, String
subject,
String messageText) at System.Web.Mail .SmtpMail.Send( String from,
String
to, String subject, String messageText) at
Test.WebForm1.P age_Load(Object
sender, EventArgs e) in c:\projects\tes t\webform1.aspx .cs:line 28

Mar 27 '06 #5
Is the ASP.NET application also running on your local machine? If not, then
the SMTP server in question is the computer that is hosting the ASP.NET app.
This would be different from an EXE which would be using the client's SMTP
server.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"Alain" <al***@nospam.c om> wrote in message
news:4e******** *************** ***@news.micros oft.com...
Hello,

I have experimented some more but I can't even get mails send to
localhost. I should expect that they are dropped in the queue folder but
the only thing I get (even when using SmtpMail.SmtpSe rver.Insert(0,
"localhost" )) is that annoying error message "Could not create
'CDO.Message' object".

On the PC of my co-worker the code works fine and when I use a windows
exe. Maybe there is a configuration issue. I am getting pretty tired of
it!
Hi,

I am trying to figure out why I get the following error when I try to
send a mail from an ASP.NET (1.1) application. When I use the same
code from a Windows exe then the code works perfectly, so I suppose
that is has something to do with security settings for IIS or SMTP
Server.

Can anybody help me, because I am getting desperate. I have also
looked it up on the web but I get a lot of stuff that I have tried but
none of the solutions helped.

Code:
SmtpMail.SmtpSe rver = "localhost" ;
SmtpMail.Send(" te**@nospam.com ", "te**@nospam.co m", "Test", "Test");
Exceprion information:
System.Web.Http Exception: Could not create 'CDO.Message' object. at
System.Web.Mail .LateBoundAcces sHelper.get_Lat eBoundType() at
System.Web.Mail .LateBoundAcces sHelper.CreateI nstance() at
System.Web.Mail .CdoSysHelper.S end(MailMessage message) at
System.Web.Mail .CdoSysHelper.S end(String from, String to, String
subject,
String messageText) at
System.Web.Mail .SmtpMail.Send( String from, String to, String subject,
String
messageText) at
Test.WebForm1.P age_Load(Object sender, EventArgs e) in
c:\projects\tes t\webform1.aspx .cs:line 28


Mar 28 '06 #6

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

Similar topics

3
7059
by: Robert Hogan | last post by:
Hello, I am attempting to send emails using T-SQL (in a SQLServerAgent Job) using the stored procedure sp_SendSMTPMail. I created the stored proc using the following script that I got off a post here on google. CREATE PROCEDURE sp_SendSMTPMail (@From varchar(255), @To varchar(8000), @Subject varchar(255), @Body varchar(8000),
4
9282
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 to then actually send the e-mail? Thanks
2
91043
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 message: "
2
7269
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 object" is encountered. I suspect it could be due to the low privilege asp.net
1
2694
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 system administrator will not allow relaying. In the ASP.Net web.config file I let the web application...
3
9252
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 system administrator will not allow relaying. In the ASP.Net web.config file I let the web application...
1
2429
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, everything works fine and I get my html tags in plain text. I've got it working (in plain text) with my...
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 an exception, whitht e message: "Could not access 'CDO.Message' object.". Can anyone suggest...
3
2579
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 below, I have included three different ways that I have tried it, and both VB.Net options fail, any...
0
8355
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8866
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8550
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8638
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7381
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6191
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4365
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2769
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1769
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.