?
Solved

Error: A connection attempt failed

Posted on 2009-05-01
8
Medium Priority
?
1,032 Views
Last Modified: 2013-11-07
hi

i have a button and on its click i have written one line which is
response.redirect("home.aspx")

Now on local everything works fine but when i upload it on server then it shows error. The page is not even transferred to "home.aspx"
the error is :

 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 75.125.56.238:25
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.
Please help me..
0
Comment
Question by:badalpatel
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 9

Expert Comment

by:VikramMullick
ID: 24277285
try
response.redirect("home.aspx",false)
0
 
LVL 6

Author Comment

by:badalpatel
ID: 24277289
not worked.
the above code works in local environment. and it shows error on online server where  i deployed the application
0
 
LVL 9

Expert Comment

by:VikramMullick
ID: 24277312
ping the webserver , check , whether you are getting any response.
Are you using any log file , check the file.
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 14

Accepted Solution

by:
GiftsonDJohn earned 1000 total points
ID: 24277413
Why the page is being attempting connection to the port 25. (75.125.56.238:25 )

It is commonly used for SMTP services. Are you using any SMTP services in your application. If so then check whether your sever has access to the server. A firewall settings can block the network.
0
 
LVL 11

Assisted Solution

by:vs1784
vs1784 earned 600 total points
ID: 24277587
You must be sending email from the button click or any oterh event.

Comment it and try.
0
 
LVL 26

Assisted Solution

by:Anurag Thakur
Anurag Thakur earned 400 total points
ID: 24278123
can you share the stack trace
it might be useful to see which line is the culprit line
0
 
LVL 6

Author Comment

by:badalpatel
ID: 24286087
Thanks for your comments

Actully previously i was sending an email on button click. But once this error comes i have comment out my whole code which was written on button click..But somehow i am still getting this error.
I have mailed to hosting server to check this out.
Do you guys think this is hosting server problem rather then code problem??

i have copy the stack trace below but i think it doesnt help much here
 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 75.125.56.238:25
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 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 75.125.56.238:25
 
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 (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 75.125.56.238:25]
   System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +239
   System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +35
   System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +224
 
[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) +5421675
   System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) +202
   System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) +21
   System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) +332
   System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) +160
   System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) +159
   System.Net.Mail.SmtpClient.GetConnection() +35
   System.Net.Mail.SmtpClient.Send(MailMessage message) +1213
 
[SmtpException: Failure sending mail.]
   System.Net.Mail.SmtpClient.Send(MailMessage message) +1531
   CommonMethods.sendMail(MailMessage mail) +246
   solutionRoom.sendMail(String ProjectID) +610
   solutionRoom.btnSubmitSolution_Click(Object sender, ImageClickEventArgs e) +97
   System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +108
   System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +118
   System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

Open in new window

0
 
LVL 14

Expert Comment

by:GiftsonDJohn
ID: 24286215
Still the function CommonMethods.sendMail is called from the event btnSubmitSolution_Click. Please compile the code again.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Integration Management Part 2
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question