Page 1 of 1

SMTP Relay - Service not available, timeout

PostPosted: Thu Oct 09, 2008 10:02 pm
by euricelw
We are using Ability Mail for SMTP relay purposes and there is one application that works most of the time but randomly returns the following error message:
“System.Net.Mail.SmtpException: Service not available, closing transmission channel. The server response was: Connection closing due to time out or forced shutdown.” . The SMTP log does not register that attempt to send mail, this never happened with our previous SMTP service. SPAM filtering and content filtering are not enabled. Can someone help? Thanks.

Re: SMTP Relay - Service not available, timeout

PostPosted: Fri Oct 10, 2008 10:31 am
by rob
The error message being provided is one of our error messages and so the server is at least accepting connections but timing out for some reason. I would recommend you enable DEBUG logging for the SMTP and then attempt to send another mail. Hopefully the logs will reveal what is causing the connection to get stuck. If you would like my opionion of the logs, then please send a copy of the debug logs to rob@code-crafters.com. Obvious things to check in the meantime are the time out value for your SMTP and that if you are using SMTP Authentication, the client is also using this.

Re: SMTP Relay - Service not available, timeout

PostPosted: Fri Apr 03, 2009 6:24 pm
by euricelw
I believe the problem with the random errors is related to ASP.Net smtpClient pooling, it seems that the connection doesn't really close properly.

What can be done is set SmtpClient.ServicePoint.MaxIdleTime = 1. More details for this workaround can be found at http://connect.microsoft.com/VisualStud ... kID=146711.

Thanks for your help