Wednesday, December 5, 2012

Solution: UNABLE TO READ DATA FROM THE TRANSPORT CONNECTION: NET_IO_CONNECTIONCLOSED.

Server Error in '/' 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: 

 

Line 73:           //  client.Credentials = aCred;

Line 74:             MailMessage message = ComposeEmailMessage(fromName, fromEmail, toAddressList, subject, emailBody, isHTML);

Line 75:             client.Send(message);

Line 76:         }

Line 77:         catch (Exception e)


Source File: c:\inetpub\vhosts\aspdotnet-rajkumar.com\httpdocs\landing\Cont.aspx.cs    Line: 75 

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) +1063455

   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.]

   System.Net.Mail.SmtpClient.Send(MailMessage message) +1531

   Contactus.SendSimpleEmail(String toAddressList, String subject, String emailBody, Boolean isHTML) in c:\inetpub\vhosts\aspdotnet-rajkumar.com\httpdocs\landing\Cont.aspx.cs:75

 

[Exception: Error sending email from info@aspdotnet-rajkumar.com]

   Contactus.SendSimpleEmail(String toAddressList, String subject, String emailBody, Boolean isHTML) in c:\inetpub\vhosts\aspdotnet-rajkumar.com\httpdocs\landing\Cont.aspx.cs:79

   Contactus.Sendadminmail(String name, String email, String Mobile) in c:\inetpub\vhosts\aspdotnet-rajkumar.com\httpdocs\landing\Cont.aspx.cs:34

   Contactus.Submit_Click1(Object sender, EventArgs e) in c:\inetpub\vhosts\aspdotnet-rajkumar.com\httpdocs\landing\Cont.aspx.cs:21

   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 includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

 


Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5456

Solve: WebException , the remote name could not be resolved

Server Error in '/' Application.


The remote name could not be resolved: 'mail.aspdotnet-rajkumar.com/'

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.Net.WebException: The remote name could not be resolved: 'mail.aspdotnet-rajkumar.com/'

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: 

 

[WebException: The remote name could not be resolved: 'mail.aspdotnet-rajkumar.com/']

   System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout) +5501831

   System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) +202

   System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) +21

   System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) +332

   System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) +160

   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.]

   System.Net.Mail.SmtpClient.Send(MailMessage message) +1531

   Contactus.SendSimpleEmail(String toAddressList, String subject, String emailBody, Boolean isHTML) +103

 

[Exception: Error sending email from admin@aspdotnet-rajkumar.com/]

   Contactus.SendSimpleEmail(String toAddressList, String subject, String emailBody, Boolean isHTML) +161

   Contactus.Sendadminmail(String name, String email, String Mobile) +222

   Contactus.Submit_Click1(Object sender, EventArgs e) +83

   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 includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

 


Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5456

How to solve this error Bad sequence of commands. The server response was: This mail server requires authentication

Server Error in '/' Application.


Bad sequence of commands. The server response was: This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server.
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.Net.Mail.SmtpException: Bad sequence of commands. The server response was: This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server.

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: 

[SmtpException: Bad sequence of commands. The server response was: This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server.]
   System.Net.Mail.RecipientCommand.CheckResponse(SmtpStatusCode statusCode, String response) +1066623
   System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) +241
   System.Net.Mail.SmtpClient.Send(MailMessage message) +1480
   Contactus.SendSimpleEmail(String toAddressList, String subject, String emailBody, Boolean isHTML) +103

[Exception: Error sending email from admin@aspdotnet-rajkumar.in]
   Contactus.SendSimpleEmail(String toAddressList, String subject, String emailBody, Boolean isHTML) +161
   Contactus.Sendadminmail(String name, String email, String Mobile) +222
   Contactus.Submit_Click1(Object sender, EventArgs e) +83
   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 includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565



Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5456