Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Could not access 'CDO.Message' object

Reply
Thread Tools

Could not access 'CDO.Message' object

 
 
Nathan Alden
Guest
Posts: n/a
 
      06-25-2003
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.SmtpServer = "mail.myispmailserver.com";
SmtpMail.Send(message);

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 "explanations," 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


 
Reply With Quote
 
 
 
 
Jurjen de Groot
Guest
Posts: n/a
 
      06-25-2003
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.StreamWriter("<YourWebLocation>\err.log" , True)

sw.WriteLine("Error " & vbCrLf & vbCrLf & ex.Message)
sw.WriteLine("InnerException 1 = " & vbCrLf & vbCrLf &
ex.InnerException.Message)
sw.WriteLine("InnerException 2 = " & vbCrLf & vbCrLf &
ex.InnerException.InnerException.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.SmtpServer = "mail.myispmailserver.com";
SmtpMail.Send(message);

that worked for me !!

Hope this helps.

Jurjen de Groot
G.I.T.S., Netherlands


"Nathan Alden" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.SmtpServer = "mail.myispmailserver.com";
> SmtpMail.Send(message);
>
> 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 "explanations," 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
>
>



 
Reply With Quote
 
 
 
 
Nathan Alden
Guest
Posts: n/a
 
      06-25-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.StreamWriter("<YourWebLocation>\err.log" , True)
>
> sw.WriteLine("Error " & vbCrLf & vbCrLf & ex.Message)
> sw.WriteLine("InnerException 1 = " & vbCrLf & vbCrLf &
> ex.InnerException.Message)
> sw.WriteLine("InnerException 2 = " & vbCrLf & vbCrLf &
> ex.InnerException.InnerException.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.SmtpServer = "mail.myispmailserver.com";
> SmtpMail.Send(message);
>
> that worked for me !!
>
> Hope this helps.
>
> Jurjen de Groot
> G.I.T.S., Netherlands
>
>
> "Nathan Alden" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.SmtpServer = "mail.myispmailserver.com";
> > SmtpMail.Send(message);
> >
> > 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 "explanations," 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
> >
> >

>
>



 
Reply With Quote
 
Brenton Unger
Guest
Posts: n/a
 
      07-03-2003
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
"undocumented feature".

I'm at a complete loss.

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

Thanks.

-Brenton


"Nathan Alden" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.StreamWriter("<YourWebLocation>\err.log" , True)
> >
> > sw.WriteLine("Error " & vbCrLf & vbCrLf & ex.Message)
> > sw.WriteLine("InnerException 1 = " & vbCrLf & vbCrLf &
> > ex.InnerException.Message)
> > sw.WriteLine("InnerException 2 = " & vbCrLf & vbCrLf &
> > ex.InnerException.InnerException.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.SmtpServer = "mail.myispmailserver.com";
> > SmtpMail.Send(message);
> >
> > that worked for me !!
> >
> > Hope this helps.
> >
> > Jurjen de Groot
> > G.I.T.S., Netherlands
> >
> >
> > "Nathan Alden" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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.SmtpServer = "mail.myispmailserver.com";
> > > SmtpMail.Send(message);
> > >
> > > 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 "explanations," 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
> > >
> > >

> >
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not connect to mail server System.Web Could not access 'CDO.Message' object. ????? Adam Knight ASP .Net 1 12-05-2005 05:38 AM
why a object's method could demand a class but not a object? mike Java 1 01-21-2005 09:34 AM
Error Message: Outlook Express Could Not Be Started Because Msoe.dll Could Not Be Loaded Dutch Treat Computer Support 4 06-21-2004 02:01 PM
MailMessage problem - Could not access 'CDO.Message' object. Anthony Fine ASP .Net 3 02-12-2004 11:35 PM
Project could not be opened because a language-specific compiler could not be instantieted Roxanne ASP .Net 0 07-04-2003 10:22 AM



Advertisments