Unable to read data from the transport connection: net_io_connectionclosed

Rate It (1)

Last post 07-21-2009 12:25 PM by RonnieStokie. 18 replies.

Sort Posts:

  • Unable to read data from the transport connection: net_io_connectionclosed

    10-03-2005, 1:27 PM
    • Member
      315 point Member
    • ptjoe
    • Member since 09-12-2005, 5:27 PM
    • Porto Portugal
    • Posts 63
     I added arecovery password to the default page, when i try to recover the password i get this error message

    Server Error in '/WebSite1' Application.

    Unable to read data from the transport connection: net_io_connectionclosed.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [IOException: Unable to read data from the transport connection: net_io_connectionclosed.]
       System.Net.Mail.SmtpReplyStreamFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine) +223
       System.Net.Mail.SmtpReplyStreamFactory.ReadLines(SmtpReplyStream caller, Boolean oneLine) +303
       System.Net.Mail.SmtpReplyStreamFactory.ReadLine(SmtpReplyStream caller) +53
       System.Net.Mail.SmtpReplyStream.ReadLine() +47
       System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) +1027
       System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) +287
       System.Net.Mail.SmtpClient.GetConnection() +56
       System.Net.Mail.SmtpClient.Send(MailMessage message) +1664
    
    [SmtpException: Failure sending mail.]
       System.Net.Mail.SmtpClient.Send(MailMessage message) +2171
       System.Web.UI.Util.SendMail(MailMessage message) +54
       System.Web.UI.WebControls.PasswordRecovery.SendMail(String to, String userName, String password) +415
       System.Web.UI.WebControls.PasswordRecovery.AttemptSendPasswordQuestionView() +603
       System.Web.UI.WebControls.PasswordRecovery.AttemptSendPassword() +93
       System.Web.UI.WebControls.PasswordRecovery.OnBubbleEvent(Object source, EventArgs e) +135
       System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
       System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +107
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +72
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3871
    


    Version Information: Microsoft .NET Framework Version:2.0.50215.44; ASP.NET Version:2.0.50215.44
    any clues ?
    Joao
  • Re: Unable to read data from the transport connection: net_io_connectionclosed

    11-11-2005, 3:42 AM
    • Contributor
      2,068 point Contributor
    • mike123
    • Member since 07-22-2002, 3:45 PM
    • Posts 727

    I'm having this problem too .. did you find a solution?

    Thanks!
    mike123

  • Re: Unable to read data from the transport connection: net_io_connectionclosed

    02-15-2006, 7:40 AM

    What this error means is that System.net.mail was unable to find the smtp server.

    The answer will vary depending on whether you have a fixed IP or a dynamic IP but,
    basically, you need to assign a valid IP to your smtp server.

    With fixed IP's this is relatively straightforward.
    With dynamic IP's it takes a bit of tweaking.

    Open the IIS Manager and check the properties for the smtp server.

    In the Default SMTP Virtual Server's properties, in the "Access" tab,
    in the Connection Control and Relay dialogs, make sure that your local IP is assigned.
    ( In my case, it's 10.0.0.2... )

    You may also need to modify your hosts file, to point 127.0.0.1 to your machine name.
    ( \WINDOWS\system32\drivers\etc\hosts )

    Then, in your code, assign your machine name to the smtp client :

    Dim client As New SmtpClient("yourmachinename")
    client.Send(mail)

     

    Juan T. Llibre, ASP.NET MVP (1997-2009)
    Foros de VS 2010 y ASP.NET 4.0, en español



  • Re: Unable to read data from the transport connection: net_io_connectionclosed

    06-22-2007, 9:53 AM
    • Member
      7 point Member
    • rvidal
    • Member since 05-10-2007, 3:26 PM
    • Posts 8

    I haven't found a solution yet.

    when i find it,i'll let you know.

    Ray 

     

  • Re: Unable to read data from the transport connection: net_io_connectionclosed

    06-22-2007, 11:04 AM
    • Member
      7 point Member
    • rvidal
    • Member since 05-10-2007, 3:26 PM
    • Posts 8

    Hi,it's me again,i did what you told me and i overcame the former message,

    In my code i assigned my machine name as  administrator/Computos8,you know the username and machine name.

     and now i get the following message.

    The remote name could not be resolved: 'administrator/Computos8.

     

    Thank you.

    Ray

     

    Filed under:
  • Re: Unable to read data from the transport connection: net_io_connectionclosed

    06-22-2007, 1:14 PM
    • Member
      7 point Member
    • rvidal
    • Member since 05-10-2007, 3:26 PM
    • Posts 8

    Unable to read data from the transport connection: net_io_connectionclosed


    What this error means is that System.net.mail was unable to find the smtp server.

    The answer will vary depending on whether you have a fixed IP or a dynamic IP but,
    basically, you need to assign a valid IP to your smtp server.

    With fixed IP's this is relatively straightforward.
    With dynamic IP's it takes a bit of tweaking.

    Open the IIS Manager and check the properties for the smtp server.

    In the Default SMTP Virtual Server's properties, in the "Access" tab,
    in the Connection Control and Relay dialogs, make sure that your local IP is assigned.
    ( In my case, it's 10.0.0.2... )

    You may also need to modify your hosts file, to point 127.0.0.1 to your machine name.
    ( \WINDOWS\system32\drivers\etc\hosts )

    Then, in your code, assign your machine name to the smtp client :

    Dim client As New SmtpClient("yourmachinename")
    client.Send(mail)

     

    Filed under:
  • Re: Unable to read data from the transport connection: net_io_connectionclosed

    08-18-2007, 1:51 AM
    • Member
      499 point Member
    • gdl
    • Member since 06-21-2002, 8:10 PM
    • Austin, TX
    • Posts 117

    The error usually happens when the smtp server does not recognize the email address in the "from" field. Make sure you set the "from" with an email address that actualy exists in your smtp server.

    See code below for an example, note how the email server used in the email of the "from" field is the same as the one specified as the smtp server:

    Dim from As String = "me@youremailserver.com"

    Dim recipientEmail As String = "someone@someamailserver.com"

    Dim m As New MailMessage(from, recipientEmail)

    m.Subject = subject

    m.Body = message & sb.ToString

    Dim client As New SmtpClient("youremailserver.com")

    client.Send(m)

    Ricardo D. Sanchez
    GDL Technologies
    Website: www.gdltec.net
    Blog: www.ricardodsanchez.com
    Twitter: @ricardodsanchez
    Please remember to click "Mark as Answer" on this post if it helped you.
  • Re: Unable to read data from the transport connection: net_io_connectionclosed

    08-29-2007, 7:58 AM

    hi i am also facing the same problem

     i am using the password recovery control in my aspx page

    My Web.config

    <?xml version="1.0"?>

    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

    <connectionStrings>

    <add name="defaultConnectionString" connectionString="Data Source=vitws-10;Initial Catalog=jobstarter;User ID=sa;Connect Timeout=200" />

    <add name="defaultConnectionString1" connectionString="Data Source=vitws-10;DataBase=jobstarter; User ID=sa;Password=;" />

    </connectionStrings>

    <system.web>

    <pages theme="Default">

    </pages>

    <compilation debug="true">

    <assemblies>

    <add assembly="System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

    <add assembly="System.Xml, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

    <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

    <add assembly="System.Security, Version=2.0.1.2, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

    </assemblies>

    </compilation>

     

    <
    authentication mode="Forms">

    <forms name=".ASPXAUTH" loginUrl="~/default.aspx"></forms>

    </authentication>

    <membership defaultProvider="MyProvider">

    <providers>

     

    <
    add connectionStringName="defaultConnectionString" applicationName="/JobSiteStarterKit"

    description="" requiresUniqueEmail="true" enablePasswordRetrieval="false" minRequiredPasswordLength="4"

    minRequiredNonalphanumericCharacters="0"

    enablePasswordReset="true" requiresQuestionAndAnswer="true" passwordFormat="Hashed"

    name="MyProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

    </providers>

    </membership>

     

    </
    system.web>

    <system.net>

    <mailSettings>

    <smtp from="sales@pingjob.com">

    <network defaultCredentials="true" host="localhost" password="" userName=""/>

    </smtp>

    </mailSettings>

    </system.net>

    <appSettings>

    <add key="DBConn" value="Data Source=vitws-10;Database=jobstarter; User ID=sa;password=;"/>

    <add key="ProductAmount" value="4.99"/>

    <add key="numberToShow" value="20" />

    </appSettings>

    </configuration>

     

     

    VITWS-10 is my server.. please help me..

  • Re: Unable to read data from the transport connection: net_io_connectionclosed

    11-20-2007, 8:14 AM
    • Member
      8 point Member
    • thduttonuk
    • Member since 10-29-2007, 10:20 AM
    • Conwy, Wales
    • Posts 6

    This is an SMTP Virtual server issue, load up IIS and

    • Right click Default SMTP Virtual server.
    • Change IP address to All Unassigned

    This should work..

    Tom Dutton
  • Re: Unable to read data from the transport connection: net_io_connectionclosed

    02-17-2008, 7:50 PM

    I am also getting this problem but randomnly and I cannot figure out what is going on. The IP address of the mail server is fixed. The machine running the web application does not have SMTP installed. The email addresses are valid and the email server is setup to allow the relay to take place. Any other possibilities I am not looking at?

  • Re: Unable to read data from the transport connection: net_io_connectionclosed

    04-25-2008, 12:04 PM
    • Contributor
      3,474 point Contributor
    • lberan
    • Member since 02-12-2008, 7:23 PM
    • Pittsburgh, PA
    • Posts 824

    i also have the same problem.  after i tried all the suggestions, i now get this error message:

    The remote name could not be resolved:

    Lynn

    Please mark replies that have helped you as answers.
  • Re: Unable to read data from the transport connection: net_io_connectionclosed

    08-24-2008, 12:35 AM
    • Member
      189 point Member
    • erikkl2000
    • Member since 06-05-2005, 5:55 AM
    • McKinney, TX.
    • Posts 160

     Thanks man this helped me out a lot!

     

    Erik

    There’s my side and there’s your opinion
  • Re: Unable to read data from the transport connection: net_io_connectionclosed

    09-15-2008, 6:06 AM
    • All-Star
      19,836 point All-Star
    • raghav_khunger
    • Member since 08-18-2008, 8:25 AM
    • Delhi, India
    • Posts 3,600
    • TrustedFriends-MVPs
    You have specified wrong

    smtpClient.Host

    or u havenot supplied smtpClient.Host

     

     

     

    Mark as Answer if it helps u.

    Raghav CodeASP.NET Community | My Blog | jQuery Intellisense in Visual Studio 2008




    "Success doesn't come to you…you go to it."--Marva Collins

    "Failure is success if we learn from it." Malcolm Forbes

    "Success does not come to those who wait . . . and it does not wait for anyone to come to it." Anonymous


  • Re: Unable to read data from the transport connection: net_io_connectionclosed

    09-15-2008, 3:37 PM
    • Member
      2 point Member
    • wuxia0074
    • Member since 08-24-2004, 5:43 PM
    • Posts 1

    Thanks a lot.

     Assigning a static IP solved the problem

    rvidal:

    Unable to read data from the transport connection: net_io_connectionclosed


    What this error means is that System.net.mail was unable to find the smtp server.

    The answer will vary depending on whether you have a fixed IP or a dynamic IP but,
    basically, you need to assign a valid IP to your smtp server.

    With fixed IP's this is relatively straightforward.
    With dynamic IP's it takes a bit of tweaking.

    Open the IIS Manager and check the properties for the smtp server.

    In the Default SMTP Virtual Server's properties, in the "Access" tab,
    in the Connection Control and Relay dialogs, make sure that your local IP is assigned.
    ( In my case, it's 10.0.0.2... )

    You may also need to modify your hosts file, to point 127.0.0.1 to your machine name.
    ( \WINDOWS\system32\drivers\etc\hosts )

    Then, in your code, assign your machine name to the smtp client :

    Dim client As New SmtpClient("yourmachinename")
    client.Send(mail)

     


     
  • Re: Unable to read data from the transport connection: net_io_connectionclosed

    01-17-2009, 9:51 AM

    Tried all the solutions above, and they don't fix this. The problem is that the connection to the mailserver isn't closed properly. It times out at the mailserver, then the .net connection (with or without pooling) on the webserver times out from being idle too long. We've had all sorts of random errors, all relating down to the same re-use problem of the smtpClient pooling. The actual problem is that there is no proper way to close the connection once you're done.

    Set SmtpClient.ServicePoint.MaxIdleTime = 1; according to supported work-around: http://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=146711 which makes all smtp work properly.

    Here's a complete sample: Njoy / Peter

     

    MailMessage msgMail = new MailMessage();
    msgMail.To.Add(new MailAddress("info@somedomain.se"));
    msgMail.Subject = "Message from web";
    msgMail.IsBodyHtml = true;
    msgMail.Body = "Test message";
    SmtpClient Client = new SmtpClient();  /* uses settings form web.config */
    Client.ServicePoint.MaxIdleTime = 1; /* without this the connection is idle too long and not terminated, times out at the server and gives sequencing errors */
    Client.Send(msgMail);
    msgMail.Dispose();
    
     

     

    Filed under:
Page 1 of 2 (19 items) 1 2 Next >