473,385 Members | 1,343 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,385 software developers and data experts.

Urgent SendMail Problem

I have been using this code for a while now and I haven't changed this code
for at least a couple weeks... I do not suspect the code. The error I'm
getting is the following:

Message: Could not access 'CDO.Message' object.

StackTrace: at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj,
String methodName, Object[] args)
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 DSI.CIS.UserRegister.btnSubmit_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\DSI\CIS\UserRegister.aspx.cs:li ne 524

TargetSite: System.Object CallMethod(System.Object, System.String,
System.Object[])

InnerException: 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 invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifier[] modifiers,
CultureInfo culture, String[] namedParameters)
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
methodName, Object[] args)

HelpLink:
The line of code that is failing is this:
System.Web.Mail.SmtpMail.Send(this.HomeOfficeEmail , oUser.Email,

oEmailMessage.Subject, oEmailMessage.Body);

I stepped through the code and all the values are correct so I can only
assume that something is wrong with .NET itself.

Any help would be appreciated!!!

Andrea
Nov 19 '05 #1
7 1088
Did anyone change anything on the SMTP server? The ASP.NET account could
have expired, relaying could be turned off, the IP address could change.

Did anyone change/uninstall CDO on the Web server or change the permissions?

Just tossing out some ideas of things that have been known to cause problems
with email sending.

Ken
"Andrea Williams" <an*******@hotmailIHATESPAM.com> wrote in message
news:ep**************@TK2MSFTNGP10.phx.gbl...
I have been using this code for a while now and I haven't changed this code
for at least a couple weeks... I do not suspect the code. The error I'm
getting is the following:

Message: Could not access 'CDO.Message' object.

StackTrace: at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject
obj,
String methodName, Object[] args)
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 DSI.CIS.UserRegister.btnSubmit_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\DSI\CIS\UserRegister.aspx.cs:li ne 524

TargetSite: System.Object CallMethod(System.Object, System.String,
System.Object[])

InnerException: 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 invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifier[]
modifiers,
CultureInfo culture, String[] namedParameters)
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
methodName, Object[] args)

HelpLink:
The line of code that is failing is this:
System.Web.Mail.SmtpMail.Send(this.HomeOfficeEmail , oUser.Email,

oEmailMessage.Subject, oEmailMessage.Body);

I stepped through the code and all the values are correct so I can only
assume that something is wrong with .NET itself.

Any help would be appreciated!!!

Andrea


Nov 19 '05 #2
the smtp server is rejecting the connection, or is not found. check that the
stmpp servername is valid, that is it running, allows anonymous access, and
relaying from your asp.net server.

-- bruce (sqlwork.com)
"Andrea Williams" <an*******@hotmailIHATESPAM.com> wrote in message
news:ep**************@TK2MSFTNGP10.phx.gbl...
| I have been using this code for a while now and I haven't changed this
code
| for at least a couple weeks... I do not suspect the code. The error I'm
| getting is the following:
|
| Message: Could not access 'CDO.Message' object.
|
| StackTrace: at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject
obj,
| String methodName, Object[] args)
| 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 DSI.CIS.UserRegister.btnSubmit_Click(Object sender, EventArgs e) in
| c:\inetpub\wwwroot\DSI\CIS\UserRegister.aspx.cs:li ne 524
|
| TargetSite: System.Object CallMethod(System.Object, System.String,
| System.Object[])
|
| InnerException: 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 invokeAttr,
| Binder binder, Object target, Object[] args, ParameterModifier[]
modifiers,
| CultureInfo culture, String[] namedParameters)
| at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
| methodName, Object[] args)
|
| HelpLink:
|
|
| The line of code that is failing is this:
| System.Web.Mail.SmtpMail.Send(this.HomeOfficeEmail , oUser.Email,
|
| oEmailMessage.Subject, oEmailMessage.Body);
|
| I stepped through the code and all the values are correct so I can only
| assume that something is wrong with .NET itself.
|
| Any help would be appreciated!!!
|
| Andrea
|
|
Nov 19 '05 #3
Further investigation finds this... If I turn off the connection security
(allow all) on the SMTP server AND allow all to relay, the Send mail works.
However, I don't like this solution as it opens security holes big time!

The only thing I can think of that has changed is that I installed the .NET
1.1 SP 1 and a security patch (KB833987). I suspect it broke something.
Before I was able to set the Connection security to only allow my IP address
and only allow my system to relay. Now that doesn't work.

I tried un-installing the SP for .NET, but still have the same problem. So
I'm thinking that it changed something permenantly and uninstall didn't
reset it.

Incidently, if I set the Connection security to exclude all but my IP, the
email bombs. If I open that back up and set the relay to exclude all except
my IP it also bombs.

Andrea

"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:OW**************@tk2msftngp13.phx.gbl...
Did anyone change anything on the SMTP server? The ASP.NET account could
have expired, relaying could be turned off, the IP address could change.

Did anyone change/uninstall CDO on the Web server or change the permissions?
Just tossing out some ideas of things that have been known to cause problems with email sending.

Ken
"Andrea Williams" <an*******@hotmailIHATESPAM.com> wrote in message
news:ep**************@TK2MSFTNGP10.phx.gbl...
I have been using this code for a while now and I haven't changed this code for at least a couple weeks... I do not suspect the code. The error I'm getting is the following:

Message: Could not access 'CDO.Message' object.

StackTrace: at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject
obj,
String methodName, Object[] args)
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 DSI.CIS.UserRegister.btnSubmit_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\DSI\CIS\UserRegister.aspx.cs:li ne 524

TargetSite: System.Object CallMethod(System.Object, System.String,
System.Object[])

InnerException: 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 invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifier[]
modifiers,
CultureInfo culture, String[] namedParameters)
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
methodName, Object[] args)

HelpLink:
The line of code that is failing is this:
System.Web.Mail.SmtpMail.Send(this.HomeOfficeEmail , oUser.Email,

oEmailMessage.Subject, oEmailMessage.Body);

I stepped through the code and all the values are correct so I can only
assume that something is wrong with .NET itself.

Any help would be appreciated!!!

Andrea

Nov 19 '05 #4
I installed sp1 for .NET 1.1 and a security patch (KB833987) as I have just
told Ken Cox. The frustrating thing is that this was all working
correctly... I seem to remember uninstalling the SP, but it didn't fix the
problem. I was in a hurry at the time to finish up for a conference so I
left it until I returned.

I am the only one who modifies these servers and the Win03 box that is doing
this is the only one where I've installed the update and the only box with
this behavior. Since then, the live server at the ISP has started doing the
same thing and it is a Win2K box, and doesn't need that particular security
patch, so I suspect the Service Pack. (Read the previous post) I asure you
that my work around for this issue will NOT work for the ISP and I can't say
that I like it much either.

If you have any other suggestion, please let me know,
Andrea
"bruce barker" <no***********@safeco.com> wrote in message
news:#e**************@TK2MSFTNGP09.phx.gbl...
the smtp server is rejecting the connection, or is not found. check that the stmpp servername is valid, that is it running, allows anonymous access, and relaying from your asp.net server.

-- bruce (sqlwork.com)
"Andrea Williams" <an*******@hotmailIHATESPAM.com> wrote in message
news:ep**************@TK2MSFTNGP10.phx.gbl...
| I have been using this code for a while now and I haven't changed this
code
| for at least a couple weeks... I do not suspect the code. The error I'm | getting is the following:
|
| Message: Could not access 'CDO.Message' object.
|
| StackTrace: at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject
obj,
| String methodName, Object[] args)
| 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 DSI.CIS.UserRegister.btnSubmit_Click(Object sender, EventArgs e) in
| c:\inetpub\wwwroot\DSI\CIS\UserRegister.aspx.cs:li ne 524
|
| TargetSite: System.Object CallMethod(System.Object, System.String,
| System.Object[])
|
| InnerException: 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 invokeAttr,
| Binder binder, Object target, Object[] args, ParameterModifier[]
modifiers,
| CultureInfo culture, String[] namedParameters)
| at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
| methodName, Object[] args)
|
| HelpLink:
|
|
| The line of code that is failing is this:
| System.Web.Mail.SmtpMail.Send(this.HomeOfficeEmail , oUser.Email,
|
| oEmailMessage.Subject, oEmailMessage.Body);
|
| I stepped through the code and all the values are correct so I can only
| assume that something is wrong with .NET itself.
|
| Any help would be appreciated!!!
|
| Andrea
|
|

Nov 19 '05 #5
Oh yes, I checked and the ASPNET account is set to never expireand the SMTP
is set to allow anonymous...
Andrea
"bruce barker" <no***********@safeco.com> wrote in message
news:#e**************@TK2MSFTNGP09.phx.gbl...
the smtp server is rejecting the connection, or is not found. check that the stmpp servername is valid, that is it running, allows anonymous access, and relaying from your asp.net server.

-- bruce (sqlwork.com)
"Andrea Williams" <an*******@hotmailIHATESPAM.com> wrote in message
news:ep**************@TK2MSFTNGP10.phx.gbl...
| I have been using this code for a while now and I haven't changed this
code
| for at least a couple weeks... I do not suspect the code. The error I'm | getting is the following:
|
| Message: Could not access 'CDO.Message' object.
|
| StackTrace: at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject
obj,
| String methodName, Object[] args)
| 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 DSI.CIS.UserRegister.btnSubmit_Click(Object sender, EventArgs e) in
| c:\inetpub\wwwroot\DSI\CIS\UserRegister.aspx.cs:li ne 524
|
| TargetSite: System.Object CallMethod(System.Object, System.String,
| System.Object[])
|
| InnerException: 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 invokeAttr, | Binder binder, Object target, Object[] args, ParameterModifier[]
modifiers,
| CultureInfo culture, String[] namedParameters)
| at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
| methodName, Object[] args)
|
| HelpLink:
|
|
| The line of code that is failing is this:
| System.Web.Mail.SmtpMail.Send(this.HomeOfficeEmail , oUser.Email,
|
| oEmailMessage.Subject, oEmailMessage.Body);
|
| I stepped through the code and all the values are correct so I can only
| assume that something is wrong with .NET itself.
|
| Any help would be appreciated!!!
|
| Andrea
|
|

Nov 19 '05 #6
New info!

Going on the premise that the CDO.Message object was not firing based on
some kind of permission, I looked for the dll for the object
(cdosys.dll). I looked at the security tab on that dll and found that
compared to other dll's, the "Users" group was not given permission to
execute the dll. I added the permission and added the connection security
back to SMTP that had made SMTP fail. Then I tested my email send again. It
worked!

So my question is, why did one of the patches take the security group off of
the dll in the first place?

Andrea
"Andrea Williams" <an*******@hotmailIHATESPAM.com> wrote in message
news:ep**************@TK2MSFTNGP10.phx.gbl...
I have been using this code for a while now and I haven't changed this code for at least a couple weeks... I do not suspect the code. The error I'm
getting is the following:

Message: Could not access 'CDO.Message' object.

StackTrace: at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String methodName, Object[] args)
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 DSI.CIS.UserRegister.btnSubmit_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\DSI\CIS\UserRegister.aspx.cs:li ne 524

TargetSite: System.Object CallMethod(System.Object, System.String,
System.Object[])

InnerException: 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 invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters)
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
methodName, Object[] args)

HelpLink:
The line of code that is failing is this:
System.Web.Mail.SmtpMail.Send(this.HomeOfficeEmail , oUser.Email,

oEmailMessage.Subject, oEmailMessage.Body);

I stepped through the code and all the values are correct so I can only
assume that something is wrong with .NET itself.

Any help would be appreciated!!!

Andrea

Nov 19 '05 #7
Ok, I was wrong... The last thing I did only made it worked if the user was
NOT logged in to my app. I'm using Form Authenitication with my database
info and once I'm logged into my app, the email will no longer send... same
error as before.

I added the Everyone permission to the cdosys.dll and that didn't fix it, so
now I'm stumped.

Andrea
"Andrea Williams" <an*******@hotmailIHATESPAM.com> wrote in message
news:ep**************@TK2MSFTNGP10.phx.gbl...
I have been using this code for a while now and I haven't changed this code for at least a couple weeks... I do not suspect the code. The error I'm
getting is the following:

Message: Could not access 'CDO.Message' object.

StackTrace: at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String methodName, Object[] args)
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 DSI.CIS.UserRegister.btnSubmit_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\DSI\CIS\UserRegister.aspx.cs:li ne 524

TargetSite: System.Object CallMethod(System.Object, System.String,
System.Object[])

InnerException: 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 invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters)
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
methodName, Object[] args)

HelpLink:
The line of code that is failing is this:
System.Web.Mail.SmtpMail.Send(this.HomeOfficeEmail , oUser.Email,

oEmailMessage.Subject, oEmailMessage.Body);

I stepped through the code and all the values are correct so I can only
assume that something is wrong with .NET itself.

Any help would be appreciated!!!

Andrea

Nov 19 '05 #8

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

Similar topics

2
by: Babaloo | last post by:
Hello, I am having a problem with PHP 4.2.2 and RH 8. PHP is working fine except email. I have a test script to send mail, I have sendmail_path = '/usr/lib/sendmail -t -i' set in php.ini,...
4
by: jim | last post by:
Hello, I am having a problem w/SendMail reporting: " No recipient addresses found in header". Funny thing is though, I properly recieve the email message. Thanks for your help. -jim
1
by: Liam.M | last post by:
HEY GUYS, need some urgent help here....I am querying my database based on a DueDate field...and want to send an automated email to anyone that falls within two months PRIOR to this "DueDate",...
3
by: swangdb | last post by:
I have a Sun Server running Solaris 10 and Sendmail 8.13.7. I have Majordomo and Listproc installed on this server and they work. I have several production majordomo and listproc mailing lists...
4
by: Nilesh | last post by:
I have a server in which sendmail gives problem. How do i change php.ini so that i can use exim for mail() System is FC-6.
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.