Error: "The application domain in which the thread was running has been unloaded"

来源:互联网 发布:猴王水果竞猜php源码 编辑:程序博客网 时间:2024/04/30 01:18

 

SUMMARY

When attempting to run your web application inside Visual Studio 2005, you may receive the error: "The application domain in which the thread was running has been unloaded"

SYMPTOM

This error has been known to occur in Visual Studio when one of the following occurs:CAUSE

  • The application has been copied from another machine.
  • The development machine is low on Virtual Memory

 

This exception is thrown when an attempt is made to access an unloaded application domain.  ASP.NET is recycling the application (unloading the application appdomain), so the debugger finds no threads to debug, because the
threads have been exited.

RESOLUTION

Usually, just selecting the rebuild option is enough to resolve this issue.   However you may also need to:

  • adjust your virtual memory settings to make more virtual memory available. 
  • exit other applications that are consuming large amounts of virtual memory.
  • it also appears that Microsoft attempted a fix for this in Service Pack 1 for Visual Studio 2005, although this has not resolved the issue for all people.

参考网址:http://devnet.asna.com/KB/Pages/433.aspx