Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > A socket operation was attempted to an unreachable network

Thread Tools

A socket operation was attempted to an unreachable network

manual tester
Posts: n/a
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.

..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(Bool ean
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(Strin g host, Int32
port) +333
System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port)
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.SendPasswordMa il(String email,
String userName, String password, MailDefinition mailDefinition, String
defaultSubject, String defaultBody, OnSendingMailDelegate
onSendingMailDelegate, OnSendMailErrorDelegate onSendMailErrorDelegate,
Control owner) +482

System.Web.UI.WebControls.PasswordRecovery.Attempt SendPasswordQuestionView()
System.Web.UI.WebControls.PasswordRecovery.Attempt SendPassword()
System.Web.UI.WebControls.PasswordRecovery.OnBubbl eEvent(Object
source, EventArgs e) +136
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs
args) +56
System.Web.UI.WebControls.Button.OnCommand(Command EventArgs e) +107
System.Web.UI.WebControls.Button.RaisePostBackEven t(String
eventArgument) +178

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Reply With Quote
Peter Johnson
Posts: n/a
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.



Reply With Quote
manual tester
Posts: n/a
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.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Application attempted to perform an operation not allowed Rishi ASP .Net 1 11-11-2009 09:35 AM
The Application attempted to perform an operation not allowed Rishi ASP .Net Security 0 11-09-2009 06:39 AM
socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Laszlo Nagy Python 1 01-27-2009 05:05 PM
Re: socket.unbind or socket.unlisten? - socket.error: (48,'Address already in use') Jean-Paul Calderone Python 0 01-27-2009 01:41 PM
Problem with os.listdir and delay with unreachable network drives onWindows Read Roberts Python 0 12-22-2004 11:02 PM