Unable to read data from the transport connection: net_io_connectionclosed.
fridayeve said 1 year, 1 month ago:
My website is hosted with Godaddy shared windows hosting. I am trying to send email out using the form on my website; most of the time it works but for some reason it throws following error.
Failure sending mail.(System.Net.Mail.SmtpException) at System.Net.Mail.SmtpClient.Send(MailMessage message)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Unable to read data from the transport connection: net_io_connectionclosed.(System.IO.IOException) at System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine)
Here is my code for the same…
SmtpClient client = new SmtpClient(“relay-hosting.secureserver.net”, 25);
client.Credentials = CredentialCache.DefaultNetworkCredentials;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.EnableSsl = false;
client.Send(email);
As I mentioned, this error I am getting on some random base. I don’t know how to resolve this.
I tried to call Godaddy support but its terrible. Has anyone faced the same issue, can someone guide me how to resolve this issue.
chrisg said 1 year, 1 month ago:
@fridayeve,
Can you provide the domain name or the specific URL of your live form page where the error described is being generated from?
Christopher G.
fridayeve said 1 year, 1 month ago:
My website is http://www.FridayEve.co. Try to register first and then post a new listing. This error occurs when you either post a new listing or update existing listing.
Regards,
Shailesh
http://www.FridayEve.co
chrisg said 1 year, 1 month ago:
@fridayeve,
My apologies for the delay.
I have successfully created a test registration, listing, and edited the listing without duplicating the described error. I have also taken a moment to review the matter with a member of our hosting team who can find no reported issues with the server your site is associated with that would account for such error messages to appear.
If you are still encountering this error on your end, I would recommend reaching out to our Live Support via phone while you are duplicating the matter, so we can investigate the account further.
Christopher G.
jeremyu said 1 year ago:
I’m having the same issue when sending to larger distribution lists, I’ve opened a new ticket with support, I’ll let you know what comes of it. I’m using the message add function in a while loop to get email addresses out of a SQL table. If I change the query to bring back a small amount of records, it works. Error:
System.Net.Mail.SmtpException: Failure sending mail. —> 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, SmtpFailedRecipientException& exception)
at System.Net.Mail.SmtpClient.Send(MailMessage message)
— End of inner exception stack trace —
at System.Net.Mail.SmtpClient.Send(MailMessage message)
jeremyu said 1 year ago:
godaddy replied that they only allow 100 emails at a time, I’m only sending 59, I replied back to support, I’ll keep you posted.
chrisg said 1 year ago:
@jeremyu,
Thank you for taking a moment to bring this up. Keep us posted on how this goes. Our Live Support should be able to help resolve the matter.
Christopher G.
fridayeve said 1 year ago:
Hi Jeremyu,
GoDaddy is support is scrap and useless. I did some research and found the solution for this problem.
Below is the working code…
SmtpClient client = new SmtpClient(“relay-hosting.secureserver.net”, 25);
client.Credentials = CredentialCache.DefaultNetworkCredentials;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.EnableSsl = false;
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(email);
email.Dispose();
Make sure you set ServicePoint.MaxIdleTime and also disposing MailMessage instance after using it. These two changes will help you resolving this error.
Let me know if it helps.
Regards,
Team FridayEve.co
chrisg said 1 year ago:
@jeremyu,
Looking over the above sample, this should do the trick. Let us know how the suggested coding from @fridayeve works out for you.
Christopher G.
jeremyu said 1 year ago:
Team FridayEve.co – Thank you so much for the suggestion, I’m updating my code and I’ll let you know.
harleyguy74 said 10 months ago:
Hi, I’m having the same issue except the e-mail from my site is being handled by the CreateUserWizard. I’m thinking that because of this I will have to define the MaxIdleTime in the web.config file somehow. Is this correct or can I handle it somewhere else? If so what should the settings look like? Right now the mail settings in the web.config file look like this:
<mailSettings>
<smtp from=”user@somewebsite.com”>
<network host=”relay-hosting.secureserver.net”/>
</smtp>
</mailSettings>
Thanks in advance for the help.
0 min expected wait time