VB.NET |
Failure sending mail.
System.Net.Mail.SmtpException was unhandled by user code
Message="Failure sending mail."
Source="System"
StackTrace:
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at gfln1.ViewCompany1.Button1_Click(Object sender, EventArgs e) in C:\Users\Iram\Documents\Visual Studio 2008\Projects\gfln1\gfln1\ViewCompany1.aspx.vb:line 108
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException: System.Net.WebException
Message="Unable to connect to the remote server"
Source="System"
StackTrace:
at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout)
at System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback)
at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback)
at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)
at System.Net.Mail.SmtpClient.GetConnection()
at System.Net.Mail.SmtpClient.Send(MailMessage message)
InnerException: System.Net.Sockets.SocketException
ErrorCode=10061
Message="No connection could be made because the target machine actively refused it 2001:0:4137:9e76:3808:bd63:4b4d:74f7:25"
NativeErrorCode=10061
Source="System"
StackTrace:
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)
InnerException:

Krishna GaradRank #191 · 12.8K reputationPosted Jan 5, 2011, 8:40 PM EST
http://www.c-sharpcorner.com/UploadFile/prathore/2464/Default.aspx
Subhendu DeRank #1,108 · 1.7K reputationPosted Jan 5, 2011, 8:41 PM EST
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 2001:0:4137:9e76:3808:bd63:4b4d:74f7:25"
NativeErrorCode=10061
Be sure the SMTP server is accessible from your machine. Try pinging the smtp server from your machine and check if connectivity works between them or not.
erum mirzaRank #3,517 · 413 reputationPosted Jan 5, 2011, 8:44 PM EST
erum mirzaRank #3,517 · 413 reputationPosted Jan 5, 2011, 8:52 PM EST
Pinging 174.133.41.130 with 32 bytes of data:
Reply from 174.133.41.130: bytes=32 time=277ms TTL=111
Reply from 174.133.41.130: bytes=32 time=291ms TTL=111
Request timed out.
Reply from 174.133.41.130: bytes=32 time=278ms TTL=111
Ping statistics for 174.133.41.130:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 277ms, Maximum = 291ms, Average = 282ms
ShankeyRank #972 · 2.1K reputationPosted Jan 5, 2011, 9:10 PM EST
Please have a look at following links
http://jalpesh.blogspot.com/2009/07/sending-email-through.html
http://forums.asp.net/p/1327405/3743484.aspx
Subhendu DeRank #1,108 · 1.7K reputationPosted Jan 5, 2011, 9:17 PM EST
Be sure if the port is open and no firewall rules block the port.
erum mirzaRank #3,517 · 413 reputationPosted Jan 5, 2011, 9:19 PM EST