A socket operation was attempted to an unreachable network

Discussion in 'ASP .Net Web Controls' started by manual tester, Apr 18, 2006.

  1. I am new to ASP.NET. I am getting the following errror, when i tried to
    run a website that has 'Password Recovey' control in it. I think the
    error has something to do with the SMTP mail settings. Can anyone tell
    me how to set up email settings for the password recovery control to
    work properly.

    Thanks,
    ..NET Developer

    ============================================

    A socket operation was attempted to an unreachable network
    Description: An unhandled exception occurred during the execution of
    the current web request. Please review the stack trace for more
    information about the error and where it originated in the code.

    Exception Details: System.Net.Sockets.SocketException: A socket
    operation was attempted to an unreachable network

    Source Error:

    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 (0x2743): A socket operation was attempted to an
    unreachable network]
    System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
    SocketAddress socketAddress) +200
    System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +60
    System.Net.ServicePoint.ConnectSocketInternal(Boolean
    connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress&
    address, ConnectSocketState state, IAsyncResult asyncResult, Int32
    timeout, Exception& exception) +579

    [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) +391
    System.Net.PooledStream.Activate(Object owningObject, Boolean async,
    Int32 timeout, GeneralAsyncDelegate asyncCallback) +288
    System.Net.PooledStream.Activate(Object owningObject,
    GeneralAsyncDelegate asyncCallback) +46
    System.Net.ConnectionPool.GetConnection(Object owningObject,
    GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) +429
    System.Net.Mail.SmtpConnection.GetConnection(String host, Int32
    port) +333
    System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)
    +287
    System.Net.Mail.SmtpClient.GetConnection() +56
    System.Net.Mail.SmtpClient.Send(MailMessage message) +1679

    [SmtpException: Failure sending mail.]
    System.Net.Mail.SmtpClient.Send(MailMessage message) +2246
    System.Web.UI.WebControls.LoginUtil.SendPasswordMail(String email,
    String userName, String password, MailDefinition mailDefinition, String
    defaultSubject, String defaultBody, OnSendingMailDelegate
    onSendingMailDelegate, OnSendMailErrorDelegate onSendMailErrorDelegate,
    Control owner) +482

    System.Web.UI.WebControls.PasswordRecovery.AttemptSendPasswordQuestionView()
    +743
    System.Web.UI.WebControls.PasswordRecovery.AttemptSendPassword()
    +106
    System.Web.UI.WebControls.PasswordRecovery.OnBubbleEvent(Object
    source, EventArgs e) +136
    System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs
    args) +56
    System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +107
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String
    eventArgument) +178

    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
    eventArgument) +31
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    sourceControl, String eventArgument) +32
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
    +72
    System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    +3838
     
    manual tester, Apr 18, 2006
    #1
    1. Advertising

  2. Could you post the code that sends the email out?

    It is possible you haven't specified the mail server correctly? or not
    set it at all?

    Without seeing the code we can only guess.

    Regards,

    Pete
     
    Peter Johnson, Apr 22, 2006
    #2
    1. Advertising

  3. The problem is fixed now. I had not set the profile settings in the
    web.config file, which caused the error.
    Thanks for your reply.
     
    manual tester, Apr 26, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jacob

    Re: unreachable statements

    Jacob, Aug 16, 2004, in forum: Java
    Replies:
    2
    Views:
    403
    Joona I Palaste
    Aug 16, 2004
  2. Unreachable

    , Sep 6, 2003, in forum: Python
    Replies:
    1
    Views:
    411
    Bertel Lund Hansen
    Sep 6, 2003
  3. Read Roberts
    Replies:
    0
    Views:
    364
    Read Roberts
    Dec 22, 2004
  4. Rishi
    Replies:
    1
    Views:
    3,778
    Alexey Smirnov
    Nov 11, 2009
  5. Rishi
    Replies:
    0
    Views:
    821
    Rishi
    Nov 9, 2009
Loading...

Share This Page