Unable to read data from the transport connection: net_io_connectionclosed

Last post 11-07-2009 3:59 PM by mohsinaeem. 1 replies.

Sort Posts:

  • Unable to read data from the transport connection: net_io_connectionclosed

    11-07-2009, 2:53 AM
    • Member
      41 point Member
    • Ramganeshv
    • Member since 04-18-2008, 4:59 AM
    • Posts 68

    Hi there

                    While i am sending mail from my site its showing this error. the same code was working fine earlier but now its showing the following error


    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:

    Line 30:         Catch ex As Exception
    Line 31:
    Line 32: Throw ex
    Line 33: End Try
    Line 34: End Sub

    Source File: D:\hshome\be2gether\be2gether.com\App_Code\blGlobal.vb    Line: 32

    Stack Trace:

    [IOException: Unable to read data from the transport connection: net_io_connectionclosed.]
    System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine) +1057579
    System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine) +248
    System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller) +16
    System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) +642
    System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) +159
    System.Net.Mail.SmtpClient.GetConnection() +35
    System.Net.Mail.SmtpClient.Send(MailMessage message) +1213

    [SmtpException: Failure sending mail.]
    blGlobal.SendMail(String FromAddress, String ToAddress, String subject, String TheBody, Boolean isHTML) in D:\hshome\be2gether\be2gether.com\App_Code\blGlobal.vb:32
    Admin_ComposeMail.btnsendMail_Click(Object sender, EventArgs e) in D:\hshome\be2gether\be2gether.com\admin\ComposeMail.aspx.vb:113
    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
    System.Web.UI.Page.ProcessRequestMain(Boolean include

              


    and my mail sending code is


    Try
                Dim mail As New MailMessage()
                 mail.From = New MailAddress(FromAddress)
                mail.To.Add(ToAddress)
                mail.Subject = subject
                mail.BodyEncoding = System.Text.Encoding.ASCII
                mail.Body = TheBody
                mail.IsBodyHtml = isHTML
                mail.Priority = MailPriority.High
                Dim smt As New SmtpClient("DomainIPaddress")
                smt.Credentials = New NetworkCredential("webmaster@mydomain.com", "mypassword")
                smt.Send(mail)
                mail.Dispose()
            Catch ex As Exception
                        Throw ex
            End Try



     I have googled but cant find any solution. please can anyone help me to find out the solustion its urgent.


    Thanks in advance

    Ram


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

    11-07-2009, 3:59 PM
    Answer
    • Contributor
      2,236 point Contributor
    • mohsinaeem
    • Member since 05-08-2008, 3:41 AM
    • Fort Lauderdale, FL
    • Posts 336

    Refer to these threads:

    http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvb/thread/cc486768-8323-4f9a-81f6-b637152f0082
    http://forums.asp.net/t/924682.aspx

    Mohsin Naeem
    MCPD 2.0, MCTS (SharePoint 2007, SQL Server 2005)
    "Please mark as answer if it helped you"
Page 1 of 1 (2 items)