Xerratus
Happily stressed out, since 1974


 
Friday, January 13, 2006
<< Sometimes its better to not know
Going under the knife >>

Problem:
When using System.Net.Mail.SmtpClient to send email I received the following error with the resulting stacktrace:

System.Net.Mail.SmtpException: Failure sending mail.

Failure sending mail. Unable to connect to the remote server
An established connection was aborted by the software in your host machine
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) System

Solution:
If you run into this error from your dev (local) host try disabling any anti-virus software.  The software is blocking email from being sent by mass emailing worms and it treats the request above as such.

Notice this line in the stacktrace

    An established connection was aborted by the software in your host machine


This is the anti-virus software blocking your request.

Credits:
After reading this thread from Microsofts forums, I found the solution near the bottom.  Oddly enough, it was not set as the "accepted answer" like it should have been hence this posting.

Sunday, June 24, 2007 8:27:01 PM (Pacific Standard Time, UTC-08:00)
thx u very much
It's work for me

Before I do this I try to add inernet user to smtp service
but it's seem nothing changed
firelight
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview