System.OutOfMemoryException and PreRenderRecursiveInternal




I've been searching through a lot of posts on these subjects, but none
of them seem to pertain to what I'm seeing. I've got a C# app
which never really pulls back a lot of rows, but I'm now getting this
out of memory exception. I'm getting all my data from a web service.
Initially I built the web service and had it as part of my project and
everything was working fine. I would call the web service and return
a dataset and then use that dataset to fill grids etc., pretty
standard stuff. The problem started happening when I decided that I
should make my webservice standalone, so that when I had to make
changes to it, I could update my webservice, without affecting my
original project. Then what I did was include the web service dll as
a reference so I could still get Datasets back from the webservice.
At this point I started getting the System.OutOfMemoryException
error. The call stack then references the PreRenderRecursiveInternal
method about 5 times, so I was wondering if this was getting into a
repeating loop, thus causing the memory error?? I'm not sure either
if by making a reference to the web service dll, if this is the proper
way to do that or not.

Any thoughts or comments on this would be appreciated.


Gary Jones

Server Error in '/' Application.

Exception of type 'System.OutOfMemoryException' 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.OutOfMemoryException: Exception of type
'System.OutOfMemoryException' 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

Stack Trace:

[OutOfMemoryException: Exception of type 'System.OutOfMemoryException'
was thrown.]
System.Reflection.Assembly._GetType(String name, Boolean
throwOnError, Boolean ignoreCase) +0
System.Reflection.Assembly.GetType(String name, Boolean
throwOnError, Boolean ignoreCase) +41

assembliesCollection, String typeName, Boolean ignoreCase) +257
System.Web.Compilation.BuildManager.GetType(String typeName,
Boolean throwOnError, Boolean ignoreCase) +432
typeName) +187

arguments) +2510
arguments, DataSourceViewSelectCallback callback) +84
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +154
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +99
System.Web.UI.WebControls.GridView.DataBind() +23

System.Web.UI.Control.EnsureChildControls() +134
System.Web.UI.Control.PreRenderRecursiveInternal() +109
System.Web.UI.Control.PreRenderRecursiveInternal() +233
System.Web.UI.Control.PreRenderRecursiveInternal() +233
System.Web.UI.Control.PreRenderRecursiveInternal() +233
System.Web.UI.Control.PreRenderRecursiveInternal() +233
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


OK- isn't it funny how you post to these groups and then before anyone
responds, you typically figure it out already. I guess that's a good

Well- in this case what happened was when I created the standalone web
service I changed the name of the [WebService(Namespace="xx")]. I
don't really understand why, but when I changed it back to the
original name, everything worked. I'll look into that now.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question