Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 02, 2007 08:27 PM by jacthemanus
Oct 31, 2007 04:32 AM|LINK
I am trying to send email from my web site. My code is on Godaddy.com web server.
Here is a piece of code form my registration page:
I also setup my web.config to match Godaddy.com requirements:
<network host="smtpout.secureserver.net" password="mypwd" userNamefirstname.lastname@example.org />
Note that I have another site with the exact same code. the only difference is the ConectionString and the emails, and it works fine. I don't understand. Can someone shed a light? Thank you
But it does not work. I have the below error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%@ Page Language="C#" Debug="true" %>
2) Add the following section to the configuration file of your application:
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond]
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +1028066
System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +33
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +431
[WebException: Unable to connect to the remote server]
System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout) +1475352
System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) +190
System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) +21
System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) +318
System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) +227
System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) +316
System.Net.Mail.SmtpClient.Send(MailMessage message) +1485
[SmtpException: Failure sending mail.]
System.Net.Mail.SmtpClient.Send(MailMessage message) +2074
Registration.Register(Object sender, EventArgs e) +5884
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
Oct 31, 2007 10:10 AM|LINK
Nov 02, 2007 06:58 AM|LINK
Based on my understanding, when you send email in your asp.net application, you get the error message above. If I have misunderstood you, please feel free to let me know.
The code that is used to send the email works fine on another website, which indicates that the code is correct.
To better understand your issue, could you please confirm the following information:
I hope this helps.
Nov 02, 2007 08:27 PM|LINK
i have the same exact code (except the connect string and the email address) running on the web server of the same provider. I took the code from domain1.com (the running code) and move it to domain2.com, made modification to the connectString, the email and
password. I am not sure why it does not work.