473,322 Members | 1,259 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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.SmtpServer = "localhost";
SmtpMail.Send("te**@nospam.com", "te**@nospam.com", "Test", "Test");

Exceprion information:
System.Web.HttpException: Could not create 'CDO.Message' object. at
System.Web.Mail.LateBoundAccessHelper.get_LateBoun dType() at
System.Web.Mail.LateBoundAccessHelper.CreateInstan ce() at
System.Web.Mail.CdoSysHelper.Send(MailMessage message) at
System.Web.Mail.CdoSysHelper.Send(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.Page_Load(Object sender, EventArgs e) in
c:\projects\test\webform1.aspx.cs:line 28
Mar 27 '06 #1
5 2563
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.com> wrote in message
news:4e**************************@news.microsoft.c om...
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.SmtpServer = "localhost";
SmtpMail.Send("te**@nospam.com", "te**@nospam.com", "Test", "Test");

Exceprion information:
System.Web.HttpException: Could not create 'CDO.Message' object. at
System.Web.Mail.LateBoundAccessHelper.get_LateBoun dType() at
System.Web.Mail.LateBoundAccessHelper.CreateInstan ce() at
System.Web.Mail.CdoSysHelper.Send(MailMessage message) at
System.Web.Mail.CdoSysHelper.Send(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.Page_Load(Object
sender, EventArgs e) in c:\projects\test\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.com> wrote in message
news:4e**************************@news.microsoft.c om...
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.SmtpServer = "localhost";
SmtpMail.Send("te**@nospam.com", "te**@nospam.com", "Test", "Test");

Exceprion information:
System.Web.HttpException: Could not create 'CDO.Message' object. at
System.Web.Mail.LateBoundAccessHelper.get_LateBoun dType() at
System.Web.Mail.LateBoundAccessHelper.CreateInstan ce() at
System.Web.Mail.CdoSysHelper.Send(MailMessage message) at
System.Web.Mail.CdoSysHelper.Send(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.Page_Load(Object sender, EventArgs e) in
c:\projects\test\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.SmtpServer.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.SmtpServer = "localhost";
SmtpMail.Send("te**@nospam.com", "te**@nospam.com", "Test", "Test");
Exceprion information:
System.Web.HttpException: Could not create 'CDO.Message' object. at
System.Web.Mail.LateBoundAccessHelper.get_LateBoun dType() at
System.Web.Mail.LateBoundAccessHelper.CreateInstan ce() at
System.Web.Mail.CdoSysHelper.Send(MailMessage message) at
System.Web.Mail.CdoSysHelper.Send(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.Page_Load(Object sender, EventArgs e) in
c:\projects\test\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_ROOT\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_ROOT\CLSID\{xxxxxxxx-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 “InprocServer32” 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.com> wrote in message
news:4e**************************@news.microsoft.c om...
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.SmtpServer = "localhost";
SmtpMail.Send("te**@nospam.com", "te**@nospam.com", "Test", "Test");
Exceprion information:
System.Web.HttpException: Could not create 'CDO.Message' object. at
System.Web.Mail.LateBoundAccessHelper.get_LateBoun dType() at
System.Web.Mail.LateBoundAccessHelper.CreateInstan ce() at
System.Web.Mail.CdoSysHelper.Send(MailMessage message) at
System.Web.Mail.CdoSysHelper.Send(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.Page_Load(Object
sender, EventArgs e) in c:\projects\test\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.com> wrote in message
news:4e**************************@news.microsoft.c om...
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.SmtpServer.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.SmtpServer = "localhost";
SmtpMail.Send("te**@nospam.com", "te**@nospam.com", "Test", "Test");
Exceprion information:
System.Web.HttpException: Could not create 'CDO.Message' object. at
System.Web.Mail.LateBoundAccessHelper.get_LateBoun dType() at
System.Web.Mail.LateBoundAccessHelper.CreateInstan ce() at
System.Web.Mail.CdoSysHelper.Send(MailMessage message) at
System.Web.Mail.CdoSysHelper.Send(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.Page_Load(Object sender, EventArgs e) in
c:\projects\test\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
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...
4
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...
2
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...
2
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...
1
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...
3
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...
1
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...
2
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...
3
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shllpp 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.