473,597 Members | 2,190 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Could not access 'CDO.Message' object

I've already searched Google. I've already asked people in IRC. I have still
not found a solution that works for me for this extremely discouraging
apparent bug in the SmtpMail class.

MailMessage message = new MailMessage();
// set params here
SmtpMail.SmtpSe rver = "mail.myispmail server.com";
SmtpMail.Send(m essage);

This works if I run it in a console application on my Windows Server 2003
box. However if I execute the *exact same code* from my ASP.NET application
I receive the error message in the subject line.

I have heard various "fixes" for this, including setting permissions on
mailroot, and "explanatio ns," including "the process ASP.NET serves pages
under is not allowed to create sockets except to localhost."

Will someone, preferrably from Microsoft, please tell me why this error
occurs (the REAL reason) and what I can do to get around it? Using an SMTP
virtual server on this box is undesirable.

Thanks.

Nathan Alden
MCSD
Nov 17 '05 #1
3 11797
Nathan,
I had the same problem, after checking the innerExceptions I found out that
this is a problem of the mailserver not allowing you to relay e-mail. Check
your inner exceptions,
Dim sw As New System.IO.Strea mWriter("<YourW ebLocation>\err .log", True)

sw.WriteLine("E rror " & vbCrLf & vbCrLf & ex.Message)
sw.WriteLine("I nnerException 1 = " & vbCrLf & vbCrLf &
ex.InnerExcepti on.Message)
sw.WriteLine("I nnerException 2 = " & vbCrLf & vbCrLf &
ex.InnerExcepti on.InnerExcepti on.Message)
sw.Close()

if there is a relay problem then DON'T set the smtpServer property, just dot
it like this :

MailMessage message = new MailMessage();
// set params here
// SmtpMail.SmtpSe rver = "mail.myispmail server.com";
SmtpMail.Send(m essage);

that worked for me !!

Hope this helps.

Jurjen de Groot
G.I.T.S., Netherlands
"Nathan Alden" <li*****@hotmai l.com> wrote in message
news:eR******** ******@TK2MSFTN GP11.phx.gbl...
I've already searched Google. I've already asked people in IRC. I have still not found a solution that works for me for this extremely discouraging
apparent bug in the SmtpMail class.

MailMessage message = new MailMessage();
// set params here
SmtpMail.SmtpSe rver = "mail.myispmail server.com";
SmtpMail.Send(m essage);

This works if I run it in a console application on my Windows Server 2003
box. However if I execute the *exact same code* from my ASP.NET application I receive the error message in the subject line.

I have heard various "fixes" for this, including setting permissions on
mailroot, and "explanatio ns," including "the process ASP.NET serves pages
under is not allowed to create sockets except to localhost."

Will someone, preferrably from Microsoft, please tell me why this error
occurs (the REAL reason) and what I can do to get around it? Using an SMTP
virtual server on this box is undesirable.

Thanks.

Nathan Alden
MCSD

Nov 17 '05 #2
Yes actually I had investigated the InnerExceptions and I've found it's
anything from 451 responses (LF only not allowed) to "cannot connect" etc.

"Jurjen de Groot" <in**@gits-online.nl> wrote in message
news:O2******** ******@TK2MSFTN GP10.phx.gbl...
Nathan,
I had the same problem, after checking the innerExceptions I found out that this is a problem of the mailserver not allowing you to relay e-mail. Check your inner exceptions,
Dim sw As New System.IO.Strea mWriter("<YourW ebLocation>\err .log", True)

sw.WriteLine("E rror " & vbCrLf & vbCrLf & ex.Message)
sw.WriteLine("I nnerException 1 = " & vbCrLf & vbCrLf &
ex.InnerExcepti on.Message)
sw.WriteLine("I nnerException 2 = " & vbCrLf & vbCrLf &
ex.InnerExcepti on.InnerExcepti on.Message)
sw.Close()

if there is a relay problem then DON'T set the smtpServer property, just dot it like this :

MailMessage message = new MailMessage();
// set params here
// SmtpMail.SmtpSe rver = "mail.myispmail server.com";
SmtpMail.Send(m essage);

that worked for me !!

Hope this helps.

Jurjen de Groot
G.I.T.S., Netherlands
"Nathan Alden" <li*****@hotmai l.com> wrote in message
news:eR******** ******@TK2MSFTN GP11.phx.gbl...
I've already searched Google. I've already asked people in IRC. I have

still
not found a solution that works for me for this extremely discouraging
apparent bug in the SmtpMail class.

MailMessage message = new MailMessage();
// set params here
SmtpMail.SmtpSe rver = "mail.myispmail server.com";
SmtpMail.Send(m essage);

This works if I run it in a console application on my Windows Server 2003 box. However if I execute the *exact same code* from my ASP.NET

application
I receive the error message in the subject line.

I have heard various "fixes" for this, including setting permissions on
mailroot, and "explanatio ns," including "the process ASP.NET serves pages under is not allowed to create sockets except to localhost."

Will someone, preferrably from Microsoft, please tell me why this error
occurs (the REAL reason) and what I can do to get around it? Using an SMTP virtual server on this box is undesirable.

Thanks.

Nathan Alden
MCSD


Nov 17 '05 #3
Has anyone resolved this issue?

Our development server has migrated to another network, and now
resides as a DMZ. From the exact same box, "old" asp code can send
emails perfectly, i have spent a little over 6 hours trying to resolve
this problem trying everything mentioned in every google thread
pertinent to this problem. Before the migration, we were able to send
emails out. Now, nothing I do configuration wise seems to work.

Things I've tried:
-Changing permissions on every dll related to CDO
-Changing permissions on every directory related
-Changing relay options
-Changing smtp servers
-Impersonation for the aspnet_wp application in web.config
-changing machine.config

ASP.NET blows if it can't handle such a simple task. Why is this so
difficult? Where is microsoft to step in and enlighten us on this
"undocument ed feature".

I'm at a complete loss.

Anyone with the solution, please let me/the world know.

Thanks.

-Brenton
"Nathan Alden" <li*****@hotmai l.com> wrote in message news:<u6******* *******@TK2MSFT NGP11.phx.gbl>. ..
Yes actually I had investigated the InnerExceptions and I've found it's
anything from 451 responses (LF only not allowed) to "cannot connect" etc.

"Jurjen de Groot" <in**@gits-online.nl> wrote in message
news:O2******** ******@TK2MSFTN GP10.phx.gbl...
Nathan,
I had the same problem, after checking the innerExceptions I found out

that
this is a problem of the mailserver not allowing you to relay e-mail.

Check
your inner exceptions,
Dim sw As New System.IO.Strea mWriter("<YourW ebLocation>\err .log", True)

sw.WriteLine("E rror " & vbCrLf & vbCrLf & ex.Message)
sw.WriteLine("I nnerException 1 = " & vbCrLf & vbCrLf &
ex.InnerExcepti on.Message)
sw.WriteLine("I nnerException 2 = " & vbCrLf & vbCrLf &
ex.InnerExcepti on.InnerExcepti on.Message)
sw.Close()

if there is a relay problem then DON'T set the smtpServer property, just

dot
it like this :

MailMessage message = new MailMessage();
// set params here
// SmtpMail.SmtpSe rver = "mail.myispmail server.com";
SmtpMail.Send(m essage);

that worked for me !!

Hope this helps.

Jurjen de Groot
G.I.T.S., Netherlands
"Nathan Alden" <li*****@hotmai l.com> wrote in message
news:eR******** ******@TK2MSFTN GP11.phx.gbl...
I've already searched Google. I've already asked people in IRC. I have still not found a solution that works for me for this extremely discouraging
apparent bug in the SmtpMail class.

MailMessage message = new MailMessage();
// set params here
SmtpMail.SmtpSe rver = "mail.myispmail server.com";
SmtpMail.Send(m essage);

This works if I run it in a console application on my Windows Server 2003 box. However if I execute the *exact same code* from my ASP.NET application I receive the error message in the subject line.

I have heard various "fixes" for this, including setting permissions on
mailroot, and "explanatio ns," including "the process ASP.NET serves pages under is not allowed to create sockets except to localhost."

Will someone, preferrably from Microsoft, please tell me why this error
occurs (the REAL reason) and what I can do to get around it? Using an SMTP virtual server on this box is undesirable.

Thanks.

Nathan Alden
MCSD


Nov 17 '05 #4

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

Similar topics

4
9276
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
91032
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
7260
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
2692
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
9249
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
2427
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...
4
3964
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. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80004005): Unspecified error --- End of inner exception stack trace ---
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
4346
by: pmud | last post by:
Hi, I have ab ASP.Net Application in which I need to send e-mail on button click. Even though my C# code for that is correct.I am getting the following error:: I think the following error can be bcoz of the SMTP virtual server. I cant view the SMTP virtual server in IIS. How to correct this error??? Send failure: System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException:...
3
2574
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
7969
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8381
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8035
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
6688
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...
0
5431
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3886
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3927
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2404
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
1
1494
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.