By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 1,382 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

Could not create 'CDO.Message' object

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.