Showing posts with label unhandled. Show all posts
Showing posts with label unhandled. Show all posts

Saturday, March 24, 2012

System.Net.Sockets.SocketException when using the HttpWebRequest.GetResponse

Hello i keep gettign this error when i use this code

Error:
An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in system.dll

Additional information: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full

Code:

Dim HTTP_request As HttpWebRequest
Dim HTTP_response As HttpWebResponse

HTTP_request = HttpWebRequest.Create("http://www.google.com/images/logo.gif")

HTTP_response = HTTP_request.GetResponse

the erorr happens every time on the "HTTP_response = HTTP_request.GetResponse" line

pls helpanyone pls?
The code works fine for me. Is there a chance you are behind a firewall that is blocking the outgoing call?

Thanks,

AspDotNetGuy
i dont think i block any calls at all, all i have is xp firewall on but when disable that i still get the same error.

now this happens not in all computers, in some just work fine

what kinda trafic should i be looking on this?
Very Odd. I am sure someone has run into this, can someone help? I havne't done much HTML Scraping, so I haven't experienced this before.

What version of .NET your running, maybe something changed in 1.1? No idea just a thought.
Yes is 1.1, I have even reinstalled the framework but nothing. Maybe is something machine related where or like you said some block port. i have to see more of this but man this is driving me crazy.

btw thanks for trying to help i really hope some can give moe some light on this
in case some1 has the same error i got this response in another forum and fixed my problem

This may solve your problem. I had a similar error message but got it when
trying to work with a web service.

First check article:
http://support.microsoft.com/default.aspx?scid=kb;en-us;815209 ; and use the
enum.exe and info to check and/or change your protocol bindings.

If changing your network protocols doesn't work (didn't help me) then get
the hotfix from:
http://support.microsoft.com/default.aspx?scid=kb;en-us;826757

You need to call MS and refer to this article. They may not charge you
anything and will send you the hotfix in a password protected e-mail. The
reason it is not publically available is b/c it is still being regression
tested. I was told it will be a part of the .Net 1.1 service pack which I was
also told should be available this month.

Tuesday, March 13, 2012

System.StackOverflowException


Server Error in '/' Application.
------------------------

Exception of type 'System.StackOverflowException' was thrown.
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.StackOverflowException: Exception of type 'System.StackOverflowException' was thrown.

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:

[StackOverflowException: Exception of type 'System.StackOverflowException' was thrown.]

I was poking around with some of the controls in ASP.NET 2.0, and suddenly got this message. I have tried everything I can think of, but it just won't go away! Please help!

Thomas ><>Can you be more specific? For example can you post some code or tell us when this happen, what you did that will cause this exception to be thrown etc? This kind of exception will often be thrown when the stack is full, probably when there is loop that will do something with the stack and never. For example like a recursive method that will never end.

<%@. Master Debug="true" %>
<!DOCTYPE HTML SYSTEM>
<html xmlns="http://www.w3.org/1999/xhtml"
<!-- Begin Head. -->
<head>
<title>A Random Design</title>
<meta http-equiv="Content-Type" content="text/html" />
<link type="text/css" rel="stylesheet" href="http://links.10026.com/?link=/ard.css" />
</head>
<!-- End Head. --
<body class="bodycolor02">
<form id="mainform" runat="server"
<div align="center">
<table width="98%">
<tr>
<td colspan="3">
<!-- Begin Header. -->
<table id="header" class="header01" align="center" width="100%" height="100">
<tr>
<td class="backcolor02">><> A Random Design </td>
</tr>
</table>
<!-- End Header. -->
</td>
</tr>
<tr>
<td id="left" align="left" valign="top" width="200">
<!-- Begin Controls. -->
<table id="controls" class="nav01" width="200">
<tr>
<td class="backcolor02" colspan="3" align="center">Navigation</td>
<td class="backcolor02" colspan="5" align="center">Paragraph</td>
</tr>
<tr>
<td class="backcolor02" align="center" valign="bottom"><span class="nav01">A</span></td>
<td class="backcolor02" align="center" valign="bottom"><span class="nav02">A</span></td>
<td class="backcolor02" align="center" valign="bottom"><span class="nav03">A</span></td>
<td class="backcolor02" align="center" valign="bottom"><span class="text01">A</span></td>
<td class="backcolor02" align="center" valign="bottom"><span class="text02">A</span></td>
<td class="backcolor02" align="center" valign="bottom"><span class="text03">A</span></td>
<td class="backcolor02" align="center" valign="bottom"><span class="text04">A</span></td>
<td class="backcolor02" align="center" valign="bottom"><span class="text05">A</span></td>
</tr>
</table>
<!-- End Controls. -->
<!-- Begin Summary. -->
<table id="summary" class="nav01" width="200" height="25">
<tr>
<td class="backcolor02"><span align="center">Latest Updates:</span>
<p>The conversion to ASP.NET 2.0 was a success!<br />
It's a colourful world!<br />
Note the tweaked layout...</p>
</td>
</tr>
</table>
<!-- End Summary. -->
<!-- Begin Menu. -->
<table id="menu" class="nav01" width="200">
<tr>
<td class="backcolor02" valign="top">
<asp:SiteMapDataSource Runat="Server" ID="sitemap" />
<asp:TreeView Runat="Server" ShowExpandCollapse="true" DataSourceID="sitemap">
<DataBindings>
<asp:TreeNodeBinding PopulateOnDemand="true" NavigateUrlField="url" TextField="title" />
</DataBindings>
</asp:TreeView>
</td>
</tr>
</table>
<!-- End Menu. -->
</td>
<td id="center" class="backcolor00" width="100%" align="center" valign="top">
<!-- Begin NavLinks. -->
<table id="navlinks1" class="nav01" align="center" width="100%">
<tr>
<td class="backcolor00" style="text-align: center"><span class="linkdisabled"><asp:HyperLink Runat="Server" NavigateUrl="~/">Home</asp:HyperLink></span></td>
<td class="backcolor00" style="text-align: center"><span class="linkdisabled"><asp:HyperLink Runat="Server" NavigateUrl="javascript:history.back(1)">Back</asp:HyperLink></span></td>
<td class="backcolor00" style="text-align: center"><span class="linkdisabled"><a href="http://links.10026.com/?link=../">Up</asp:HyperLink></span></td>
<td class="backcolor00" style="text-align: center"><span class="linkdisabled"><asp:HyperLink Runat="Server" NavigateUrl="javascript:history.forward(1)">Forward</asp:HyperLink></span></td>
</tr>
<tr>
<td class="backcolor00" style="text-align: center"><span class="linkdisabled">First</span></td>
<td class="backcolor00" style="text-align: center"><span class="linkdisabled">Previous</span></td>
<td class="backcolor00" style="text-align: center"><span class="linkdisabled">Next</span></td>
<td class="backcolor00" style="text-align: center"><span class="linkdisabled">Last</span></td>
</tr>
</table>
<!-- End NavLinks. -->
<!-- Begin BreadCrumbs. -->
<table id="breadcrumbs" class="nav01" align="center" width="100%">
<tr>
<td class="backcolor00">You are here: <asp:SiteMapPath ID="SiteMapPath1" Runat="Server" PathDirection="RootToCurrent" PathSeparator=":-:" CurrentNodeStyle-Font-Italic="true" />
</td>
</tr>
</table>
<!-- End BreadCrumbs. -->
<!-- Begin BodyHead. -->
<table class="header02" align="center" width="100%">
<tr>
<td class="backcolor02">
<asp:ContentPlaceHolder id="bodyhead" runat="server" />
</td>
</tr>
</table>
<!-- End BodyHead. -->
<!-- Begin BodyText. -->
<asp:Panel Runat="Server" ScrollBars="Auto" Width="100%" Height="500">
<table class="text02" align="center" width="100%">
<tr>
<td class="backcolor02" valign="top">
<asp:ContentPlaceHolder id="bodytext" runat="server" />
</td>
</tr>
</table>
</asp:Panel>
<!-- End BodyText. -->
<!-- Begin PageCounter. -->
<table class="nav01" align="center" width="100%">
<tr>
<td class="backcolor00" valign="top">
This page has been viewed <!-- Page Counter --> times.
</td>
</tr>
</table>
<!-- End PageCounter. -->
<!-- Begin NavLinks. -->
<table id="navlinks2" class="nav01" align="center" width="100%">
<tr>
<td class="backcolor00" style="text-align: center"><span class="linkdisabled"><asp:HyperLink Runat="Server" NavigateUrl="~/">Home</asp:HyperLink></span></td>
<td class="backcolor00" style="text-align: center"><span class="linkdisabled"><asp:HyperLink Runat="Server" NavigateUrl="javascript:history.back(1)">Back</asp:HyperLink></span></td>
<td class="backcolor00" style="text-align: center"><span class="linkdisabled"><a href="http://links.10026.com/?link=../">Up</asp:HyperLink></span></td>
<td class="backcolor00" style="text-align: center"><span class="linkdisabled"><asp:HyperLink Runat="Server" NavigateUrl="javascript:history.forward(1)">Forward</asp:HyperLink></span></td>
</tr>
<tr>
<td class="backcolor00" style="text-align: center"><span class="linkdisabled">First</span></td>
<td class="backcolor00" style="text-align: center"><span class="linkdisabled">Previous</span></td>
<td class="backcolor00" style="text-align: center"><span class="linkdisabled">Next</span></td>
<td class="backcolor00" style="text-align: center"><span class="linkdisabled">Last</span></td>
</tr>
</table>
<!-- End NavLinks. -->
</td>
<td id="right" align="center" valign="top" width="200">
<!-- Begin AdsTable. -->
<table valign="top" width="100%">
<tr>
<td class="backcolor00">
<!-- Begin AdsTable. -->
<table valign="top" width="100%">
<tr>
<td class="backcolor00">
<asp:ContentPlaceHolder runat="server" ID="adstable">
<asp:AdRotator Runat="server" ID="AdRotator" AdvertisementFile="~/images/adrotate.xml" />
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
<!-- End AdsTable. -->
</td>
</tr>
</table>
<!-- End AdsTable. --></td>
</tr>
<tr>
<td colspan="3">
<!-- Begin Footer. -->
<table id="footer" class="nav01" align="center" width="100%">
<tr>
<td class="backcolor02" width="100%">
<p style="text-align: center">Copyright © 2002-2004 Thomas Ingram ><> All Rights Reserved.</p>
</td>
</tr>
</table>
<!-- End Footer. -->
</td>
</tr>
</table>
</div
</form>
</body
</html>

That is the source for the Master page. I am certain the problem is not with the Content pages. Also I am using an XML file that has the menu info in it. I am sure the problem is not there either, since the menu worked at one point. Thank you.

Thomas ><>
Has anyone else seen this error? How is it fixed?
If you could send me your code and the XML file, I could check if I will have the same problem. My e-mail is fnormen@.<no spam>hotmail.com