<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Application vs. AppDomain</title><link>http://weblogs.asp.net/owscott/archive/2007/09/02/application-vs-appdomain.aspx</link><description>A question was asked on a forum that I frequent which I thought was worth writting a blog about. Q: What is the difference between an application and an Appdomain? I understand from my research so far that an Appdomain is a container within which ASPX</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Worker Process, Work threads, Application Pool, AppDomain, Web Site,</title><link>http://weblogs.asp.net/owscott/archive/2007/09/02/application-vs-appdomain.aspx#7296030</link><pubDate>Thu, 31 Dec 2009 07:58:05 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7296030</guid><dc:creator>学友</dc:creator><author>学友</author><description>&lt;p&gt;WorkerProcess=============Aworkerprocessisuser-modecodewhoseroleistoprocessrequests,s...&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7296030" width="1" height="1"&gt;</description></item><item><title>Unloading dynamically-loaded assembly</title><link>http://weblogs.asp.net/owscott/archive/2007/09/02/application-vs-appdomain.aspx#3763221</link><pubDate>Thu, 06 Sep 2007 08:08:35 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:3763221</guid><dc:creator>Danni Afasyah</dc:creator><author>Danni Afasyah</author><description>&lt;p&gt;I&amp;amp;#39;ve come to a case, where, in my application, i need to load the assembly dynamically. Its not a&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3763221" width="1" height="1"&gt;</description></item><item><title>re: Application vs. AppDomain</title><link>http://weblogs.asp.net/owscott/archive/2007/09/02/application-vs-appdomain.aspx#3754456</link><pubDate>Wed, 05 Sep 2007 22:22:21 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:3754456</guid><dc:creator>Kelly</dc:creator><author>Kelly</author><description>&lt;p&gt;Thanks Scott!&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3754456" width="1" height="1"&gt;</description></item><item><title>re: Application vs. AppDomain</title><link>http://weblogs.asp.net/owscott/archive/2007/09/02/application-vs-appdomain.aspx#3749722</link><pubDate>Wed, 05 Sep 2007 14:09:59 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:3749722</guid><dc:creator>Scott Forsyth</dc:creator><author>Scott Forsyth</author><description>&lt;p&gt;Hi Kelly. &amp;nbsp;Ok, I see where you're coming from. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you only have a single site in your app pool, then an app pool and an AppDomain recycle will be quite similar. &amp;nbsp;The app pool recycle will recycle the entire w3wp.exe process while the AppDomain will recycle the .NET AppDomain only, but since most of what that needs to be recycled lives in the AppDomain, they will achieve the same thing. &amp;nbsp;It's just a matter of which is easier for you to do. &amp;nbsp;But, if the AppDomain recycle doesn't do the trick, then try a full app pool recycle. &amp;nbsp;This will depend on your situation. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you have multiple sites in the app pool, then an AppDomain is preferred because it won't touch any of the other sites or applications in the app pool and is isolated to just the single application/AppDomain in the app pool.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3749722" width="1" height="1"&gt;</description></item><item><title>re: Application vs. AppDomain</title><link>http://weblogs.asp.net/owscott/archive/2007/09/02/application-vs-appdomain.aspx#3749625</link><pubDate>Wed, 05 Sep 2007 13:57:28 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:3749625</guid><dc:creator>Kelly</dc:creator><author>Kelly</author><description>&lt;p&gt;Thanks Scott. I guess my real question is, when would you want to do an appdomain recycle, over an app pool recycle? &amp;nbsp;When we make changes at our company, we do a an app pool recycle in order to copy in the new files. &amp;nbsp;Doing it this way helps us to not affect the other websites on the servers as you would with an IISReset. &amp;nbsp;I was just wondering if an appdomain recycle would be useful to us and an even lesser affect on our customers?&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3749625" width="1" height="1"&gt;</description></item><item><title>re: Application vs. AppDomain</title><link>http://weblogs.asp.net/owscott/archive/2007/09/02/application-vs-appdomain.aspx#3738717</link><pubDate>Wed, 05 Sep 2007 01:55:53 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:3738717</guid><dc:creator>OWScott</dc:creator><author>OWScott</author><description>&lt;p&gt;Hi Kelly,&lt;/p&gt;
&lt;p&gt;In a perfect world, nothing should be recycled unless a change is made. &amp;nbsp;But, since it's not a perfect world, occasionally something breaks or doesn't work as expected and a recycle will give it a fresh start, causing it to work again. &amp;nbsp;There have been certain bugs and situations over time that only a recycle of the app pool or AppDomain would fix it, and sometimes uploading new code changes will cause failures. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;For example, if a site is uploaded via FTP, key files could be uploaded last but before they are loaded, the site may try to run and cache an error. &amp;nbsp;So, a recycle will cause everything to be loaded fresh again.&lt;/p&gt;
&lt;p&gt;Basically, you'll know. &amp;nbsp;&amp;quot;If it ain't broke, don't fix it.&amp;quot; &amp;nbsp;But if it is broken, there are times when an AppDomain recycle is what is needed to get it working again.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3738717" width="1" height="1"&gt;</description></item><item><title>re: Application vs. AppDomain</title><link>http://weblogs.asp.net/owscott/archive/2007/09/02/application-vs-appdomain.aspx#3735438</link><pubDate>Tue, 04 Sep 2007 22:09:59 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:3735438</guid><dc:creator>Kelly</dc:creator><author>Kelly</author><description>&lt;p&gt;In what cases are recycling the appDomain useful? &amp;nbsp;When would you want to do this?&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3735438" width="1" height="1"&gt;</description></item><item><title>Interesting Finds: September 3, 2007</title><link>http://weblogs.asp.net/owscott/archive/2007/09/02/application-vs-appdomain.aspx#3720907</link><pubDate>Mon, 03 Sep 2007 14:51:51 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:3720907</guid><dc:creator>Jason Haley</dc:creator><author>Jason Haley</author><description>&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3720907" width="1" height="1"&gt;</description></item></channel></rss>