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

0 comments:

Post a Comment