Connection Error for SMTP

Discussion in 'ASP.NET / ASP.NET Core' started by wisemx, Dec 27, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. It's timing out because of the network host specified.

    This is the preferred mail setting for DASP accounts:
    <system.net>
    <mailSettings>
    <smtp>
    <network host="localhost" port="25"/>
    </smtp>
    </mailSettings>
    </system.net>

    Just alter your to match and you should be all set. [​IMG]
     
  2. I am working on an app that uses membership in asp.net. When the customer completes the CreateuserWizard, the app sticks when sending an email. I am including the stack trace info. I am sure my connection strings are correct. Can someone look and tell my mail settings and the trace?




    <mailSettings>


    <smtp from="[email protected]">


    <network host="sql2k505.discountasp.net" userName="ourusername" password="ourpassword"/>


    </smtp>


    </mailSettings>

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:
    [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 64.79.160.12:25]
    System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +1073657
    System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +33
    System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket&amp; socket, IPAddress&amp; address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception&amp; exception) +217
    [WebException: Unable to connect to the remote server]
    System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress&amp; address, Socket&amp; abortSocket, Socket&amp; abortSocket6, Int32 timeout) +1490784
    System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) +191
    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.GetConnection() +42
    System.Net.Mail.SmtpClient.Send(MailMessage message) +1485
    [SmtpException: Failure sending mail.]
    System.Net.Mail.SmtpClient.Send(MailMessage message) +2074
    System.Web.UI.WebControls.LoginUtil.SendPasswordMail(String email, String userName, String password, MailDefinition mailDefinition, String defaultSubject, String defaultBody, OnSendingMailDelegate onSendingMailDelegate, OnSendMailErrorDelegate onSendMailErrorDelegate, Control owner) +341
    System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +571
    System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +105
    System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +453
    System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +149
    System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +17
    System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
    System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
    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) +1746
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page