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

Home Posts Topics Members FAQ

System.Web

I have a program which has ran every night fine until last night. Now it
bombs with the following errors. I have also broke this down to its
simplest form for sending the mail
(http://support.microsoft.com/default...B;EN-US;314201) which gives
the same error. This server does not have any firewall software running on
it as it is the exchange server for the domain. I can also telnet smtp and
send mail using localhost, 127.0.0.1, machinename, and mx name. I have
copied the system.web.dll from a dev machine over to the running directory
and still same error msg. Any ideas?

SIMPLE FORM
----------------------------------------------------
Could not access 'CDO.Message' object.
Exception has been thrown by the target of an invocation.
The transport failed to connect to the server.


Unhandled Exception: System.Web.Http Exception: Could not access
'CDO.Message' ob
ject. ---> System.Reflecti on.TargetInvoca tionException: Exception has been
throw
n by the target of an invocation. --->
System.Runtime. InteropServices .COMExcepti
on (0x80040213): The transport failed to connect to the server.

--- End of inner exception stack trace ---
at System.RuntimeT ype.InvokeDispM ethod(String name, BindingFlags
invokeAttr,
Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture,
String[]
namedParameters )
at System.RuntimeT ype.InvokeMembe r(String name, BindingFlags invokeAttr,
Bind
er binder, Object target, Object[] args, ParameterModifi er[] modifiers,
CultureI
nfo culture, String[] namedParameters )
at System.Web.Mail .LateBoundAcces sHelper.CallMet hod(Object obj, String
method
Name, Object[] args)
--- End of inner exception stack trace ---
at System.Web.Mail .LateBoundAcces sHelper.CallMet hod(Object obj, String
method
Name, Object[] args)
at System.Web.Mail .CdoSysHelper.S end(MailMessage message)
at System.Web.Mail .SmtpMail.Send( MailMessage message)
at testmail.Module 1.Main()
Nov 21 '05 #1
5 1308
"Bryan Martin" <sp******@onlin e.nospam> schrieb:
Could not access 'CDO.Message' object.


Take a look at <URL:http://www.systemwebma il.net/>...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
Seen that article early in the troubleshooting process. As I stated before
most of the things described in the article have been tried.
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:uP******** ******@TK2MSFTN GP14.phx.gbl...
"Bryan Martin" <sp******@onlin e.nospam> schrieb:
Could not access 'CDO.Message' object.


Take a look at <URL:http://www.systemwebma il.net/>...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
Hi

Based on my understanding, you can send the email with your localhost, that
is to say the SMTP service is OK. And the program will run OK for a long
time until recently it broke suddently. Also it seems that you have tried
the KB314201, I assume you run the KB code in a console applicaton under
the account with administrator rights. If not, you may have a try and let
me know the result, so that we can isolate the problem.

If I have any misunderstandin g, please feel free to post here.

From the MSDN,

The System.Web.Mail namespace contains classes that enable you to construct
and send messages using the CDOSYS (Collaboration Data Objects for Windows
2000) message component. The mail message is delivered either through the
SMTP mail service built into Microsoft Windows 2000 or through an arbitrary
SMTP server. The classes in this namespace can be used from ASP.NET or from
any managed application.

That is to say the System.Web.Mail is the wrap for the CDOSYS.dll which is
located in the path below.
c:\WINDOWS\syst em32\cdosys.dll

From the error mesage, it seems that it has some error when the
System.Web.Mail call the cdosys.dll, or the cdosys.dll call the smtp
service.

To troubleshooting the problem, we may tried the following.
1. Try to move the code line below, so that the mail will be sent via the
localhost(pleas e make sure first the local SMTP service will work)
SmtpMail.SmtpSe rver = "MySMTPServ er"
2. Tried to run the code under administrators account in a console
application in case you have not done that.
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #4
To add insult to injury. This appears to be something between the dotnet
framework and exchange. I can change the smtpserver to an offsite smtp
server and the error goes away. I can telnet locally using 127.0.0.1,
hostname, mx name etc with success and no errors and no clients are
reporting errors sending mail. Server has been rebooted several times.
Still at a loss.
"Bryan Martin" <sp******@onlin e.nospam> wrote in message
news:OX******** ******@TK2MSFTN GP12.phx.gbl...
I have a program which has ran every night fine until last night. Now it
bombs with the following errors. I have also broke this down to its
simplest form for sending the mail
(http://support.microsoft.com/default...B;EN-US;314201) which
gives
the same error. This server does not have any firewall software running
on
it as it is the exchange server for the domain. I can also telnet smtp
and
send mail using localhost, 127.0.0.1, machinename, and mx name. I have
copied the system.web.dll from a dev machine over to the running directory
and still same error msg. Any ideas?

SIMPLE FORM
----------------------------------------------------
Could not access 'CDO.Message' object.
Exception has been thrown by the target of an invocation.
The transport failed to connect to the server.


Unhandled Exception: System.Web.Http Exception: Could not access
'CDO.Message' ob
ject. ---> System.Reflecti on.TargetInvoca tionException: Exception has been
throw
n by the target of an invocation. --->
System.Runtime. InteropServices .COMExcepti
on (0x80040213): The transport failed to connect to the server.

--- End of inner exception stack trace ---
at System.RuntimeT ype.InvokeDispM ethod(String name, BindingFlags
invokeAttr,
Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture,
String[]
namedParameters )
at System.RuntimeT ype.InvokeMembe r(String name, BindingFlags invokeAttr,
Bind
er binder, Object target, Object[] args, ParameterModifi er[] modifiers,
CultureI
nfo culture, String[] namedParameters )
at System.Web.Mail .LateBoundAcces sHelper.CallMet hod(Object obj, String
method
Name, Object[] args)
--- End of inner exception stack trace ---
at System.Web.Mail .LateBoundAcces sHelper.CallMet hod(Object obj, String
method
Name, Object[] args)
at System.Web.Mail .CdoSysHelper.S end(MailMessage message)
at System.Web.Mail .SmtpMail.Send( MailMessage message)
at testmail.Module 1.Main()

Nov 21 '05 #5
Hi

Based on my understanding, now you can send the mail by using
System.Web.Mail via the local SMTP service.
If I have any misunderstandin g, please feel free to let me know.

If so, I think the problem is isloate to the problem that how to configure
in Exchange site so that we can send mail via the remote exchange server.
Because if we can send the mail via the local server, I think the code, the
System.Web.Mail and the CDOSYS.dll should be OK(one of these has corrupt
will cause the mail send failed)

So far I think you may try to send the mail by using the local smtp
client,(e.g. Outlook express to send the email via the remote the
exchange,NOTE: I don't mean the microsoft outlook(they connect to the
exchange server use other approach than the smtp)

Also for exchange configurate issue, I think you may try to post in the
newsgroup below.
microsoft.publi c.exchange
or
microsoft.publi c.exchange2000

Thanks for your understanding!

Best regards,

Perter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #6

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

Similar topics

3
9125
by: Terrence | last post by:
I am doing some of the C# walkthroughs to transition from VB to C#. When I try to execute static void Main() { Aplication.Run(new Form1()) } I raise a 'System.NullReferenceException" in system.windows.forms.dll
3
397
by: Terrence | last post by:
I am doing some of the C# walkthroughs to transition from VB to C#. When I try to execute static void Main() { Aplication.Run(new Form1()) } I raise a 'System.NullReferenceException" in system.windows.forms.dll
5
4199
by: laks | last post by:
Hi I have the following xsl stmt. <xsl:for-each select="JOB_POSTINGS/JOB_POSTING \"> <xsl:sort select="JOB_TITLE" order="ascending"/> This works fine when I use it. But when using multiple values in the where clause as below
0
5639
by: NicK chlam via DotNetMonster.com | last post by:
this is the error i get System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. at System.Data.Common.DbDataAdapter.Update(DataRow dataRows, DataTableMapping tableMapping) at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable) at System.Data.Common.DbDataAdapter.Update(DataSet dataSet) at TryThis.Form1.save() in C:\Documents and Settings\Nick\My Documents\...
1
2146
by: Sky | last post by:
Yesterday I was told that GetType(string) should not just be with a Type, but be Type, AssemblyName. Fair enough, get the reason. (Finally!). As long as it doesn't cause tech support problems down the line... What happens when my code is run on a station that only has framework 3.0 or 4.0, and this assembly, with version number defined for 2.0.0.0 , isn't available. ...breaks? Second question: Does an assembly's PublicKeyToken change...
0
7893
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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
8040
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
8259
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6698
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 project—planning, coding, testing, and deployment—without 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...
1
5847
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3889
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
3932
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1495
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.