<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Asp.net on ZeroSharp</title><link>https://www.zerosharp.com/blog/categories/asp.net/</link><description>Recent content in Asp.net on ZeroSharp</description><generator>Hugo</generator><language>en-gb</language><copyright>Copyright © 2012–{year} Robert Anderson</copyright><lastBuildDate>Wed, 05 Aug 2015 09:26:00 +0100</lastBuildDate><atom:link href="https://www.zerosharp.com/blog/categories/asp.net/index.xml" rel="self" type="application/rss+xml"/><item><title>Force a complete garbage collection in an ASP.NET application.</title><link>https://www.zerosharp.com/force-a-complete-garbage-collection-in-an-asp-dot-net-application/</link><pubDate>Wed, 05 Aug 2015 09:26:00 +0100</pubDate><guid>https://www.zerosharp.com/force-a-complete-garbage-collection-in-an-asp-dot-net-application/</guid><description>&lt;p&gt;How can I force a full garbage collection easily within an ASP.NET application? The method here is for XAF web applications but the same approach should work with any ASP.NET app.&lt;/p&gt;



&lt;p&gt;First up: Never mess with the .NET garbage collector.&lt;/p&gt;
&lt;p&gt;I sometimes mess with the garbage collector in .NET when I&amp;rsquo;m trying to pin down some memory problem. Also, after &lt;a href="https://www.zerosharp.com/load-testing-xaf-part-1-deploying/"&gt;a load test&lt;/a&gt;, I prefer to force the garbage collector to collect everything it can so that I can check that the memory drops as expected.&lt;/p&gt;</description></item></channel></rss>