469,625 Members | 1,155 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

A connection attempt failed problem

I'm getting the following problem occasionally...the application will
work perfectly well for a period of time and then this pops up.

I have tried turning off the default proxy in the web.config which I
had seen on other posts but that did not solve the problem.

Any assistance or ideas would be appreciated
Thanks
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++

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
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

Source Error:
Line 28: xInputDoc = New System.Xml.XmlDocument()
Line 29: strUrl = "http://www.weather.gov/alerts/us.cap"
Line 30: xInputDoc.Load(strUrl)
Line 31:
Line 32: xNodeList = xInputDoc.GetElementsByTagName
("cap:info")
Source File: D:\Web\Weather\Default2.aspx.vb Line: 30

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]
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
SocketAddress socketAddress) +1002146
System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +33
System.Net.ServicePoint.ConnectSocketInternal(Bool ean connectFailure,
Socket s4, Socket s6, Socket& socket, IPAddress& address,
ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout,
Exception& exception) +431

[WebException: Unable to connect to the remote server]
System.Net.HttpWebRequest.GetResponse() +1502011
System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials
credentials) +61
System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials
credentials) +1868464
System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role,
Type
ofObjectToReturn) +51
System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Objec t xmlResolver) +44
System.Threading.CompressedStack.runTryCode(Object userData) +54

System.Runtime.CompilerServices.RuntimeHelpers.Exe cuteCodeWithGuaranteed
Cleanup(TryCode
code, CleanupCode backoutCode, Object userData) +0
System.Threading.CompressedStack.Run(CompressedSta ck compressedStack,
ContextCallback callback, Object state) +174
System.Xml.XmlTextReaderImpl.OpenUrl() +199
System.Xml.XmlTextReaderImpl.Read() +50
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean
preserveWhitespace) +145
System.Xml.XmlDocument.Load(XmlReader reader) +96
System.Xml.XmlDocument.Load(String filename) +157
Default2.Page_Load(Object sender, EventArgs e) in D:
\Web\Weather\Default2.aspx.vb:30
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +
1061


------------------------------------------------------------------------
--------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET
Version:2.0.50727.42
Aug 24 '06 #1
2 9478
Looks to me like the Weather service just didn't respond. Not much you can do
about that.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Dennis" wrote:
I'm getting the following problem occasionally...the application will
work perfectly well for a period of time and then this pops up.

I have tried turning off the default proxy in the web.config which I
had seen on other posts but that did not solve the problem.

Any assistance or ideas would be appreciated
Thanks
++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++

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
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

Source Error:
Line 28: xInputDoc = New System.Xml.XmlDocument()
Line 29: strUrl = "http://www.weather.gov/alerts/us.cap"
Line 30: xInputDoc.Load(strUrl)
Line 31:
Line 32: xNodeList = xInputDoc.GetElementsByTagName
("cap:info")
Source File: D:\Web\Weather\Default2.aspx.vb Line: 30

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]
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,
SocketAddress socketAddress) +1002146
System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +33
System.Net.ServicePoint.ConnectSocketInternal(Bool ean connectFailure,
Socket s4, Socket s6, Socket& socket, IPAddress& address,
ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout,
Exception& exception) +431

[WebException: Unable to connect to the remote server]
System.Net.HttpWebRequest.GetResponse() +1502011
System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials
credentials) +61
System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials
credentials) +1868464
System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role,
Type
ofObjectToReturn) +51
System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Objec t xmlResolver) +44
System.Threading.CompressedStack.runTryCode(Object userData) +54

System.Runtime.CompilerServices.RuntimeHelpers.Exe cuteCodeWithGuaranteed
Cleanup(TryCode
code, CleanupCode backoutCode, Object userData) +0
System.Threading.CompressedStack.Run(CompressedSta ck compressedStack,
ContextCallback callback, Object state) +174
System.Xml.XmlTextReaderImpl.OpenUrl() +199
System.Xml.XmlTextReaderImpl.Read() +50
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean
preserveWhitespace) +145
System.Xml.XmlDocument.Load(XmlReader reader) +96
System.Xml.XmlDocument.Load(String filename) +157
Default2.Page_Load(Object sender, EventArgs e) in D:
\Web\Weather\Default2.aspx.vb:30
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +
1061


------------------------------------------------------------------------
--------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET
Version:2.0.50727.42
Aug 24 '06 #2
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
<pb*******@yahoo.nospammin.comwrote in
news:B5**********************************@microsof t.com:
Looks to me like the Weather service just didn't respond. Not much you
can do about that.
Peter

When I get the "connection attempt failed" message from the application
running on server...i get it repeatedly...during the same period if I
browse directly to the external site (www.weather.gov) it responds
correctly. Eventually the problem on the server will clear and the
application displays correctly.

I don't really think its an issue of the external site being down....

thanks for responding
Aug 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by Fortepianissimo | last post: by
1 post views Thread by OldButStillLearning | last post: by
3 posts views Thread by Amar Gaikwad | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.