ANTS Memory Profiler 10

The snapshot failed because .NET did not report every referenced object

The full text of this error message is:

'The snapshot failed because .NET did not report every referenced object. If the garbage collector is operating in 'server mode' and the target application has many large objects, a bug in version 2 of the CLR is likely to be the cause.

To work around this bug, manually switch your application to the workstation garbage collector. Search for 'gcServer configuration option' at msdn.microsoft.com for information on how to do this.'

Cause / Possible causes

This message occurs because of a bug in .NET version 2.

How to fix

To work around the problem, you must switch your application to the workstation garbage collector. To do this:

For ASP.NET web applications:

For web applications, you need to make the same change in ASP.NET's configuration file on the server.

  • On 32-bit systems, the file is usually located at C:\Windows\Microsoft.NET\Framework\v2.0.50727\Aspnet.config
  • On 64-bit systems, the file is usually located at C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config

Edit this file with an XML editor, adding <gcServer enabled="false" /> as a child of the <runtime> node.

For .NET executables, Windows Services, COM+ Server applications and XBAPs:

  1. Navigate to the application.
  2. Using an XML editor, open the file myApplication.exe.config, where myApplication.exe is the name of your application. If the *.exe.config file does not exist, create it.
  3. Set the <gcServer> node to enabled="false", as follows:

    <configuration>
      <runtime>
        <gcServer enabled="false" />
      </runtime>
    </configuration>
  4. Save the file. There is no need to rebuild your application because the configuration file will be loaded automatically by .NET when the application runs.

If you continue to experience problems, please contact Redgate Support.


Didn't find what you were looking for?