473,406 Members | 2,336 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,406 software developers and data experts.

Could not Access CDO.Message

Hi,

Im using Asp.net 1.1 with C#. I want to send email using System.Web.Mail

My Code is

Expand|Select|Wrap|Line Numbers
  1. public void Send()
  2.         {
  3.             try
  4.             {
  5.  
  6.                 MailMessage mail = new MailMessage();
  7.                 mail.To = to_address;
  8.                 mail.From = from_address;
  9.                 mail.Subject = "Test";
  10.                 mail.Body = "Test Message";
  11.                 mail.BodyFormat = MailFormat.Html;
  12.                 SmtpMail.SmtpServer = smtpserver;
  13.                 SmtpMail.Send(mail);
  14.             }
  15.             catch(Exception ex)
  16.             {
  17.                 Response.Write(ex.ToString());
  18.             }
  19.  
  20.         }
The problem is that when i run this code, i get exception Could not Access CDO.Message. I have tried several solutions found on internet but none seem to work for me. Note that the same code works in Asp.net 2.0.
Plz kindly help as soon as possible
Nov 26 '07 #1
3 1115
radcaesar
759 Expert 512MB
What is the exact error message u got ?
Nov 26 '07 #2
radcaesar
759 Expert 512MB
Try by unregister the CDOEX.dll and register the CDOSYS.dll using regsvr32.
Nov 26 '07 #3
Now i get this error


System.Web.HttpException: The transport failed to connect to the server.
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server.

--- End of inner exception stack trace ---
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Web.Mail.SmtpMail.LateBoundAccessHelper.Cal lMethod(Object obj, String methodName, Object[] args)
--- End of inner exception stack trace ---
at System.Web.Mail.SmtpMail.LateBoundAccessHelper.Cal lMethod(Object obj, String methodName, Object[] args)
at System.Web.Mail.SmtpMail.CdoSysHelper.Send(MailMes sage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at WebApplication1.WebForm1.Send() in c:\inetpub\wwwroot\webapplication1\webform1.aspx.c s:line 66

I don't know whats wrong i have tried almost every thing but nothing seem to work plz help
Nov 27 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Tim Eliot | last post by:
Just wondering if anyone has hit the following issue and how you might have sorted it out. I am using the command: DoCmd.TransferText acExportMerge, , stDataSource, stFileName, True after...
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...
4
by: Lynn | last post by:
hi, anyone knows how to fix this error? Event Type: Error Event Source: ASP.NET 1.0.3705.288 Event Category: None Event ID: 1082 Date: 1/18/2004 Time: 12:50:47 AM User: N/A
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...
4
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. --->...
2
by: Martin | last post by:
Hi, I have standard code that sends mail from an asp.net application. The application is running on a production web server. it uses the standard system.web.mail namespace. most of the time...
14
by: Gianfranco | last post by:
Hi everybody, First of all, sorry for my english if it isn't perfect ;-p I have an error in an asp.net application. I have win2003 server, with iis 6. I'm developping with visual studio...
8
by: hufaunder | last post by:
I have a website that consumes a webservice. Both of them are in the Default Website folder. I can execute the service without any problem when I go to the test page http://localhost/Service.asmx....
11
by: fniles | last post by:
One of our application uses VB6 and Access97 database. Another application uses VB.NET 2005. This morning for about 15 seconds when the application tries to read either a query or a table from the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
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,...
0
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...
0
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,...
0
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...

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.