The application domain in which the thread was running has been unloaded.

L

Lloyd Sheen

While using VS 2005 Pro I get this about 50% of the time.

I run the app. See whats wrong. Stop the app (stop debugging button).
Make changes and then click the start debugging button.

If I use F5 this does not happen.

Any ideas?

Thanks
Lloyd Sheen
 
G

Guest

Each application has its own App Domain inside the aspnet worker
process. And there can be multiple instances of an Application object
inside a particular App Domain each catering to a different request.

ASP.NET creates a separate thread for each such application instance
inside an App Domain and CLR manages the thread pool. After some time,
when there are no requests to service and a specific timeout period,
the Application object kills itself and the app domain unloads.

And if somehow when ASP.NET tries to unload the application and an
exception occurs, we get this message. Another case I have seen this
error coming is when you are running your project on low memory.

Workaround 1: Stop the current aspnet_wp worker process & any
other .Net service. Then
recompile the whole solution.
Workaround 2: Clean Solution and sometimes you have to do a full
Rebuild.
Workaround 3: Check if there is still a webserver running in your
taskbar from a pervious debug, close it.

Regards,
Manish
 
L

Lloyd Sheen

Manish said:
Each application has its own App Domain inside the aspnet worker
process. And there can be multiple instances of an Application object
inside a particular App Domain each catering to a different request.

ASP.NET creates a separate thread for each such application instance
inside an App Domain and CLR manages the thread pool. After some time,
when there are no requests to service and a specific timeout period,
the Application object kills itself and the app domain unloads.

And if somehow when ASP.NET tries to unload the application and an
exception occurs, we get this message. Another case I have seen this
error coming is when you are running your project on low memory.

Workaround 1: Stop the current aspnet_wp worker process & any
other .Net service. Then
recompile the whole solution.
Workaround 2: Clean Solution and sometimes you have to do a full
Rebuild.
Workaround 3: Check if there is still a webserver running in your
taskbar from a pervious debug, close it.

Regards,
Manish

Thanks for the workarounds. It seems that if I kill the app by closing the
browser it does not happen too much. It happens more when I close it by
clicking the stop debugging button. (Listening MS?).

LS
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top