Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.
Server Error in '/' Application.
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 xx.xx.xx.xxx:80
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.SocketE
xception: 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 xx.xx.xx.xxx:80
Line 18: Protected Sub btnEmailTest_Click(sender As Object, e As EventArgs) Handles btnEmailTest.Click
Line 19: emailLogic.EmailConfirmati
Line 20: lbEmailStatus.Text = "Email Sent!"
Line 21: End Sub
[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 xx.xx.xx.xxx:80] System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +273 System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) +584 [WebException: Unable to connect to the remote server] System.Net.HttpWebRequest.GetResponse() +8765848 Email.DownloadFromURL(String URLToRead) +149 Email.EmailConfirmation() +31 mainMenu.btnEmailTest_Click(Object sender, EventArgs e) in D:\Websites\DesignRequest\mainMenu.aspx.vb:19 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +155 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804
Imports Microsoft.VisualBasic Imports System.IO Imports System.Net Imports System.Net.Mail Public Class Email Public Sub EmailConfirmation() Dim mailText As String = DownloadFromURL("http://www.mywebsite.com/basicEmail.html") Dim mail As New MailMessage() mail.From = New MailAddress("email@example.com", "Confirmation") mail.To.Add("firstname.lastname@example.org") mail.Subject = "Email Confirmation" mail.Body = mailText mail.IsBodyHtml = True Dim smtp As New SmtpClient smtp.Send(mail) End Sub Private Function DownloadFromURL(ByVal URLToRead As String) As String Dim WebRequest As HttpWebRequest = DirectCast(System.Net.WebRequest.Create(URLToRead), HttpWebRequest) WebRequest.Credentials = System.Net.CredentialCache.DefaultCredentials WebRequest.Accept = "*/*" WebRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)" WebRequest.AllowAutoRedirect = True Dim WebResponse As HttpWebResponse = DirectCast(WebRequest.GetResponse(), HttpWebResponse) Dim s As Stream = WebResponse.GetResponseStream() Dim sr As New StreamReader(s) Return sr.ReadToEnd() End Function End Class
|Help with problem with excel when converting from VS10 to VS15||3||24|
|Why do I have to have write access to my C: drive to use VS2010 to write ASP.NET applications and when I write a console application, I don't have this problem?||2||31|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
19 Experts available now in Live!