Connecting Tech Pros Worldwide Forums | Help | Site Map

CDOSYS.dll and CDOEX.dll problem

Member
 
Join Date: Jul 2008
Posts: 63
#1: Jul 22 '08
Hi everybody,

I wrote a windows service and I have to do sme email functionality in it. I used SMTP and added system.web reference to the project. there are no compilation errors as such but there is a run time error saying

System.Web.HttpException: Could not create an object of type 'CDO.Message'. Please verify that the current platform configuration supports SMTP mail.
at System.Web.Mail.SmtpMail.LateBoundAccessHelper.get _LateBoundTyp()
at System.Web.Mail.SmtpMail.CdoSysHelper.Send(MailMes sage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at export.SMTP..ctor(String filename)


i looked up and realized I need cdoex.dll or cdosys.dll in my project. i could not see both Microsoft CDO for Windows 2000 or Microsoft CDO for Exchange 2000 in the COM references list. But I do have them in my system. I tried adding them manually in the bin folder of my project. But no use.i dont know whats the problem.

i also tried registering them using regsvr32 "\WINDOWS\System32\CDOSYS.dll" and also for cdoex.dll but that is also throwing an error saying

loadlibrary("\windows\system32\cdosys.dll") failed-the specified module could notbe found.


I am using localhost as my SMTP server and it is relaying anonymous messages also. there are no authentication problems.

does anybody know what the heck is happening. its just a simple smtp emial functionality.Service worked fine till friday. it also sent emails.i dont know what happened suddenly.


please help

Member
 
Join Date: Aug 2006
Location: USA
Posts: 93
#2: Jul 22 '08

re: CDOSYS.dll and CDOEX.dll problem


hi

I think the same problem is been discurssed :
http://bytes.com/forum/thread203603.html

Refere this link it might help you.

bharath vasireddy
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,161
#3: Jul 22 '08

re: CDOSYS.dll and CDOEX.dll problem


Do you need to use CDO?
Are you using VS2003? Becuase the SMTP classes moved in .NET2.0 and onward to a different location.
Member
 
Join Date: Jul 2008
Posts: 63
#4: Jul 23 '08

re: CDOSYS.dll and CDOEX.dll problem


Hi, thanks for replying

I did not think i would need CDO but application throws an error saying

System.Web.HttpException: Could not create an object of type 'CDO.Message'. Please verify that the current platform configuration supports SMTP mail.
at System.Web.Mail.SmtpMail.LateBoundAccessHelper.get _LateBoundTyp()
at System.Web.Mail.SmtpMail.CdoSysHelper.Send(MailMes sage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at export.SMTP..ctor(String filename)

all i thought i needed was system.web.mail but i dont know why the above error came up
insertAlias's Avatar
Forum Leader
 
Join Date: Apr 2008
Location: San Antonio, TX (USA)
Posts: 2,608
#5: Jul 23 '08

re: CDOSYS.dll and CDOEX.dll problem


You should look into System.Net.Mail

Very easy to send mail using SMTP, all in managed code.
Member
 
Join Date: Jul 2008
Posts: 63
#6: Jul 23 '08

re: CDOSYS.dll and CDOEX.dll problem


It worked I used system.net.mail. Thanks for you help.
insertAlias's Avatar
Forum Leader
 
Join Date: Apr 2008
Location: San Antonio, TX (USA)
Posts: 2,608
#7: Jul 23 '08

re: CDOSYS.dll and CDOEX.dll problem


No problem.
Reply