locked
Problems with WebMail.Send: "Authentication failed because the remote party has closed the transport stream" RRS feed

  • Question

  • User379720387 posted

    Looking for ideas what this might be.

    Authentication failed because the remote party has closed the transport stream.

    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: Authentication failed because the remote party has closed the transport stream.

    Source Error:

     

    Line 133:                            var confirmationUrl = hostUrl + VirtualPathUtility.ToAbsolute("~/Account/Confirm?confirmationCode=" + HttpUtility.UrlEncode(token));
    Line 134:
    Line 135:                            WebMail.Send(
    Line 136:                                to: email,
    Line 137:                                subject: "Please confirm your account",


    Source File: c:\Users\WebSite\Account\Register.cshtml    Line: 135

    Stack Trace:

    [IOException: Authentication failed because the remote party has closed the transport stream.]
       System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) +6614626
       System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) +132
       System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) +59
       System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) +247
       System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) +137
       System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) +119
       System.Net.TlsStream.CallProcessAuthentication(Object state) +38
       System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +166
       System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) +21
       System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) +64
       System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) +797
       System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) +52
       System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) +19
       System.Net.Mail.SmtpConnection.Flush() +30
       System.Net.Mail.ReadLinesCommand.Send(SmtpConnection conn) +14
       System.Net.Mail.EHelloCommand.Send(SmtpConnection conn, String domain) +19
       System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint) +1035
       System.Net.Mail.SmtpTransport.GetConnection(ServicePoint servicePoint) +170
       System.Net.Mail.SmtpClient.GetConnection() +44
       System.Net.Mail.SmtpClient.Send(MailMessage message) +1554
    
    [SmtpException: Failure sending mail.]
       System.Net.Mail.SmtpClient.Send(MailMessage message) +1906
       System.Web.Helpers.WebMail.Send(String to, String subject, String body, String from, String cc, IEnumerable`1 filesToAttach, Boolean isBodyHtml, IEnumerable`1 additionalHeaders, String bcc, String contentEncoding, String headerEncoding, String priority, String replyTo) +800
       ASP._Page_Account_Register_cshtml.Execute() in c:\WebSite\Account\Register.cshtml:135
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +272
       System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +112
       System.Web.WebPages.WebPage.ExecutePageHierarchy() +127
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +131
       System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +178
    
    Thursday, August 20, 2015 10:12 PM

Answers

  • User-166373564 posted

    Hi,

    Authentication failed because the remote party has closed the transport stream.

    Please check whether this is Firewall issue.

    You can also check the SSL certificate.

    hope it helps.

    With regards,

    Angie

      

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 25, 2015 2:57 AM

All replies

  • User2024324573 posted

    What email client are you using?  

    Seems to be the problem with the client.

    Thursday, August 20, 2015 10:18 PM
  • User379720387 posted

    Exchange Server

    Friday, August 21, 2015 8:19 AM
  • User-166373564 posted

    Hi,

    Authentication failed because the remote party has closed the transport stream.

    Please check whether this is Firewall issue.

    You can also check the SSL certificate.

    hope it helps.

    With regards,

    Angie

      

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 25, 2015 2:57 AM