ASP.NET C# project to send e-mail via Office 365 starts firing net_io_connectionclosed

System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed. at System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller) at System.Net.Mail.CheckCommand.Send(SmtpConnection conn, String& response) at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message)

Need to change ASP to use TLS 1.2 as Microsoft of EOL TLS1.1 and rejecting emails occasionally to remind you of this! 

Upgrading the .net Framework to 4.6 and over will fix this

This the web.config file for this :  

<system.web>
<compilation targetFramework=”4.6″/> <!– Changed framework from Under 4.5 to 4.6 or 4.7 –>
<!–Added this httpRuntime –>
<httpRuntime targetFramework=”4.6″ />
</system.web>

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 2.50 out of 5)
Loading...