Questions tagged [applicationdomain]

69 questions
22
votes
1 answer

Difference between an application domain and an application pool?

What is difference between application domain and application pool? I have read many articles regarding these two terminology. but still unable to get proper understanding about them. Please elaborate it with simple description. Thanks
Amit Soni
  • 3,216
  • 6
  • 31
  • 50
21
votes
2 answers

Why does calling AppDomain.Unload doesn't result in a garbage collection?

When I perform a AppDomain.Unload(myDomain) I expect it to also do a full garbage collection. According to Jeffrey Richter in "CLR via C#" he says that during an AppDomain.Unload: The CLR forces a garbage collection to occur, reclaiming the memory…
Liviu Trifoi
  • 2,980
  • 1
  • 21
  • 28
20
votes
5 answers

What is the scope of a Static Class?

I have an assembly that may be used by more than one process at a time. If I am using a static class, would the multiple processes all use the same "instance" of that class? Since the processes are separate, would these be running under…
Keith Sirmons
  • 8,271
  • 15
  • 52
  • 75
9
votes
3 answers

Application.Current is Null for Unit Tests

I have some methods in the code base that rely on Application.Current.Dispatcher.Invoke... to make sure things run on the GUI thread. I am currently trying to write unit tests for these methods but (as expected) Application.Current is null so I'm…
KrisTrip
  • 4,943
  • 12
  • 55
  • 74
8
votes
1 answer

How can I run a WPF application in a new AppDomain? ExecuteAssembly fails

I'm trying to launch a WPF application from a Console application, using Application Domains, but when I do, I receive unexpected errors. Running the WPF application standalone, works. This code works, too: var baseDirectory =…
Matteo Caprari
  • 2,869
  • 4
  • 27
  • 35
8
votes
2 answers

What is a .NET Application Domain?

What is exactly is an Application Domain (AppDomain) and how is it different than a process or thread?
Justin Ethier
  • 131,333
  • 52
  • 229
  • 284
7
votes
1 answer

What is ApplicationDomain.domainMemory for?

In AS3, what is ApplicationDomain.domainMemory for? http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/system/ApplicationDomain.html#domainMemory
Matt
  • 3,483
  • 4
  • 36
  • 46
7
votes
1 answer

Getting an ASP.NET MVC web application to load domain neutral

My company has a large number of clients and we are currently able to handle a limited number of clients per server. Every client, however, uses the same core web application. Currently some content is stored locally in every site therefore we can't…
Joshua Enfield
  • 17,642
  • 10
  • 51
  • 98
7
votes
1 answer

DoCallBack CrossAppDomainDelegate behavior for non-static delegates

Please consider the following piece of code: // Create a new application domain AppDomain ad = AppDomain.CreateDomain("New domain"); Worker work = new Worker(); // if Worker class is marked as 'MarshalByRefObject', this will run in current //…
SHRI
  • 2,406
  • 6
  • 32
  • 48
6
votes
3 answers

Common uses and best practices for application domains in .NET?

What are some guidelines and best practices for when to create new application domains within an application? Also, what are some common uses and examples of how multiple application domains are used whithin an application?
Taylor Leese
  • 51,004
  • 28
  • 112
  • 141
5
votes
3 answers

C# code to execute code in another application domain?

I have a program that executes for 24 hours, then restarts. How can I shift main() from into a separate application domain, which is torn down and refreshed every 24 hours, in order to completely eliminate any potential memory leaks?
Contango
  • 76,540
  • 58
  • 260
  • 305
5
votes
3 answers

implement callback over ApplicationDomain-boundary in .net

I load a dll dynamically using an Applicationdomain to unload when nessesary. What i cant get to work is a callback-method from the created Appdomain if the task in the loaded dll terminates itself. What i have so far public interface…
Firo
  • 30,626
  • 4
  • 55
  • 94
5
votes
1 answer

Prevent Stack Overflow Exception from crashing process

Assume I have an application, where user can provide script written in JavaScript to perform some task in it. This is done using Jint. However, badly written script can cause Stack Overflow Exception in JintEngine.Run() and therefore crashing whole…
konrad.kruczynski
  • 46,413
  • 6
  • 36
  • 47
4
votes
3 answers

Negotiate two applications in separate domains

How can I notify another application which is in different domain that current running application has crashed? in the other words, Is it possible to negotiate two different applications in separate domain? Thanks in advance.
Saber Amani
  • 6,409
  • 12
  • 53
  • 88
4
votes
1 answer

What are the different "components" that make up Processes, AppDomains, Contexts, and Threads (and what are their relationships)?

I am really hoping to get a definitive answer to this. I have a previous question where I asked "What is a thread (really)?" I got some really good answers and my takeaway from this was that a Thread is: A thread is an independent set of values for…
richard
  • 12,263
  • 23
  • 95
  • 151
1
2 3 4 5