473,473 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

System.Net.Mail Error: Unable to read data from the transport connection: net_io_connectionclosed

I've looked everywhere for an answer to this, but only a few people
seem to have encountered it.

The code is straightforward:

MailMessage mail = new MailMessage(from, to, subject, body);
SmtpClient client = new SmtpClient("localhost");
client.Send (mail);

The code works fine on my development machine (XP Pro). When moved to
staging (2003 Server), I get the "connection closed" error. I've
confirmed the following:

-- "localhost" resolves to 127.0.0.1 (also tried using the loopback
address with the same error)
-- SMTP service is running on port 25
-- service is configured to relay mail
-- another app (Community Server) is using the service to send email
without any problems.

I'm at wit's end

TIA

Jul 13 '06 #1
1 12600
As usual, this problem was resolved out not long after posting this
message. The problem was how the SMTP service was set up.
Specifically, the service has been bound to a specific IP address (not
the webserver's; see the "IP Address" dropdown in the "General" tab).
Once this was set to "(All Unassigned)". Everything worked fine.
Hopefully this message will save someone the hours of aggravation I
endured.

na**********@gmail.com wrote:
I've looked everywhere for an answer to this, but only a few people
seem to have encountered it.

The code is straightforward:

MailMessage mail = new MailMessage(from, to, subject, body);
SmtpClient client = new SmtpClient("localhost");
client.Send (mail);

The code works fine on my development machine (XP Pro). When moved to
staging (2003 Server), I get the "connection closed" error. I've
confirmed the following:

-- "localhost" resolves to 127.0.0.1 (also tried using the loopback
address with the same error)
-- SMTP service is running on port 25
-- service is configured to relay mail
-- another app (Community Server) is using the service to send email
without any problems.

I'm at wit's end

TIA
Jul 14 '06 #2

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

Similar topics

0
by: Galore | last post by:
Hello, I'm trying to make a simple socket application, something like a chat application, but when I run it, it shows the following error when the client connects to the server: "Unable to read...
0
by: Aryeh Holzer | last post by:
Hi, I've been trying to use the weather webservice available from the National Weather Service (NWS), at http://www.nws.noaa.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML. wsdl without success. Here's...
5
by: NormD | last post by:
I have an interesting situation that I hope you can help me with. I have two versions of one application. One connects to Oracle database running on a sun box directly. The other connects to the...
0
by: Mentalis | last post by:
I have a web service that makes a request to several different xml feeds. I am having problems with one in particular and the connection keeps reporting the following error: ...
2
by: daokfella | last post by:
I'm having trouble using localhost to test the e-mail functions in my application. I keep getting the following error when sending mail: "Unable to read data from the transport connection: An...
7
by: Jay Balapa | last post by:
Hello, We have a Pocket PC client application which just connects to our webservice. When a client connects his Pocket PC through his WIFI he gets the following- Unable to read data from the...
2
by: pedrito | last post by:
I've got an app that downloads from several concurrent threads. Occasionally, I get an expcetion trying to read the HttpWebResponse stream... Sorry, the code isn't short, but I figured best to...
2
by: satnamsarai | last post by:
Using System.Net.Mail: Sometimes I get error 'failure sending mail. Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.' Not sure how...
1
by: WIzmanG | last post by:
Hi all I am having trouble with sending email via a C#2.0 application, I use the same settings as I use in Outlook but I cannot get email to send. I am trying to use SSL on port 465 and get the...
0
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,...
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
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...
1
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...
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 project—planning, coding, testing,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
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.