Tagged Questions
-2
votes
0answers
19 views
Loading assembly in another appdomain from another folder with dependencies
I've found a few variants of this question but it seems mixing all those criterias produces it's own set of errors when you want your assembly loaded
- In another appdomain
- From another folder
- ...
1
vote
0answers
39 views
Understanding AppDomains and strong naming
I'm trying to create a sandbox for where I can load plugins. I create the AppDomain and specify a StrongName for my host assembly, and my understanding is that any code running in the assembly that is ...
0
votes
0answers
54 views
Dll usage by .NET application
Have a question for .NET experts.
I have a set of WinForms applications which uses some subset of dll's (some of them are shared between those apps). All binaries resides in the same directory. I ...
0
votes
0answers
34 views
Event handler throws FileNotFoundException for assembly
I'm trying to validate resources of resource dictionaries. Therefore, I create a new AppDomain with a window, showing the resources. Of course, some of the resources are user controls, needing their ...
1
vote
1answer
33 views
C# Winforms - Trying to display OpenFileDialog by adding FileDialogPermission to AppDomainSetup
I'm trying understand Sandboxing in .Net4.0 but stumbled over this problem and unsure how to get around it within a C# Windows Form application.
Within solution explorer I have 2 projects. The first ...
0
votes
1answer
31 views
How does WCF instancing affect the context in which methods are called?
WPF Instancing: when set to per-call, does a new "instance" get created under the same process as the service. Meaning that if the call runs out of memory it will crash the service as well?
0
votes
0answers
29 views
Dynamic load assembly, how to specify the abstraction?
Assuming I have 3 levels of abstraction in different dll, composing my application
Primitive
Basic implements Primitive
Foo implements Basic
And my application load dynamically the Foo ...
0
votes
0answers
32 views
Passing an unmanaged IntPtr across app domains with NetPipes
.NET 4.5, Win 8, 64bit
I have an IntPtr to 4 GB unmanaged array. I want to pass it async to a WCF NetPipes Windows Service, which is supposed to read it, push it to DB then deallocate it.
I am aware ...
1
vote
0answers
33 views
Passing an unmanaged pointer between two AppDomains (By indirect call)
.NET 4.5, 64bit Win8
I have two MSMQ running under WCF and hosted under Windows Activation Service.
Execute MSMQ: Responsible for calling an unmanaged function and obtaining a pointer IntPtr to 4GB ...
1
vote
3answers
36 views
C#, MAF, Unhandled Exception Management in separate AppDomain
Okay, so I have a MAF application which loads up each addin inside of a separate appdomain. This is working fantastic for what I need as it allows me to dynamically unload and reload my addins at ...
0
votes
2answers
46 views
FileNotFound when load assembly with dependency to another domain
I'm trying to make application with plugins. I have MainLib.dll, where I made some commnon interface(let it be ICommon) with 1 method. Then, I made 2 .dlls(plugins) which have reference to MainLib.dll ...
0
votes
2answers
59 views
Loading DLLs into a separate AppDomain with known only common interface
I need to load .dll(plugins) in another domain. In main app I don't know anything about plugins types, only that they implement common interface ICommonInterface with some methods. So this code ...
0
votes
2answers
57 views
Application crash when anoter domain throws exception
I'm studing C#. I read books of Andrew Troelsen "C# and the .NET Platform" and Jeffrey Richter's "CLR via C#". Now, I'm trying to make application, which will load assemblies from some directory, push ...
1
vote
0answers
40 views
AppDomainManager with an XBAP
I'm trying to dynamically load an application domain manager within an XBAP. When running the application, the application domain manager is never hit and VS tells me that symbols are not loaded for ...
0
votes
0answers
41 views
OutOfMemoryException when unloading AppDomains after calling FreeLibrary
I have a plugin framework that needs to run plugins one at a time in a separate app domain. Some of these plugins may use unmanaged C++ dlls. Different plugins may depend on different versions of ...
-1
votes
0answers
51 views
c# winform can't catch thirdparty dll error and forced to closed
I have c# winform using other one's dll file in my winform, but in the runtime, it often got error causing but dll which i coudn't catch, and I use the following to catch, but still got the same, I ...
0
votes
1answer
44 views
IoC Conflicts within a WCF Service
We've created several WCF services that process asynchronous requests. We're using basicHttpBinding, consequently our InstanceContextMode is PerCall and this is what's causing a little confusion. ...
1
vote
3answers
58 views
Base Directory - Illegal characters in path
I'm having problems with a line where the base directory (the location of the .exe itself) is found, and a line from a text file within is read.
It's throwing up the 'illegal characters in path' ...
0
votes
1answer
78 views
CreateInstanceAndUnwrap fails to load assembly
I am trying to load an assembly A in a new AppDomain in my console application with same base directory and RelativePath as the default domain.
When I create a type from A using CreateInstanceFrom it ...
2
votes
2answers
222 views
How to compile C# DLL on the fly, Load, and Use
A) compiling C# EXE's and DLL's on the fly are relatively easy.
B) Executing an EXE means that a new application is run. Loading a DLL means that methods and functions can be used in cases that may be ...
3
votes
4answers
183 views
AppDomain unhandled exceptions
There are plenty of topics covering the question. But nevertheless I have a problem.
I load the assembly into new AppDomain like this:
public void Run()
{
//There's the problem.
//As Panos ...
0
votes
0answers
52 views
Set AppDomainSetup.ApplicationBase to a path that doesn't contain my application
I've written a tool that takes a path to a set of DLLs for a 3rd party application. This path is used in a handler added to AppDomain.CurrentDomain.AssemblyResolve.
This was working fine until I ...
0
votes
1answer
73 views
Cross-appDomain access to Console.Out
I need to read standart output from application (Core.exe) that runs in the same process but in different appDomain. It's quite easy to redirect output when one deals with process but the appDomains ...
1
vote
2answers
57 views
Unload child AppDomain that contains POS hardware causing CannotUnloadAppDomainException
I am using .net 4.0, with POS.net 1.12 and I create a hardware class in a new child AppDomain so that any unhandled exceptions do not kill my parent AppDomain.
I can create the child AppDomain and ...
0
votes
1answer
53 views
Full ASP.NET-style AppDomain assembly isolation
I'm writing a plugin architecture for an automation scheduler which needs to be robust, so I'm attempting to do ASP.NET/IIS-style AppDomains -- i.e. each AppDomain is really treated as its own ...
0
votes
0answers
17 views
Find Applications in AppDomain for MS Office Plugin?
Does anyone know of a way to find Application's inside an AppDomain?
Currently, I'm developing a WPF Application that gets launched from an Office Add-In. These pieces were built before I got here ...
2
votes
0answers
97 views
Cross AppDomain async method call
From the main AppDomain, I am trying to call an async method defined in a type instantiated in a different AppDomain.
For example, the following type MyClass inherits from MarshalByRefObject and is ...
1
vote
1answer
120 views
How do I pass CancellationToken across AppDomain boundary?
I have a command object, doing work based on a request from a request queue. This particular command will execute its work in a child appdomain. Part of doing its work in the child appdomain involves ...
6
votes
0answers
201 views
Deadlock when combining app domain remoting and tasks
My app needs to load plugins into separate app domains and then execute some code inside of them asynchronously. I've written some code to wrap Task in marshallable types:
static class RemoteTask
{
...
0
votes
0answers
79 views
Unit tests cannot provide situation when the class runs its methods in separate AppDomain
i have got some class that runs its method (WorkFunction) in another AppDomain. When i use it in Console Application, all right. But when i try run the same code in the unit test frameworks (MSTest, ...
1
vote
2answers
80 views
appdomain callback : assembly loading
I am a beginner in C# and I was studying a C# text book regarding AppDomain.
This is what I found in a text book "C# 4.0 in a Nutshell 4e (O'Reilly)"
Let’s revisit the most basic multidomain ...
2
votes
1answer
78 views
What is a wrapper for an instance when using AppDomain.CreateInstance?
May be a basic question:
I went through this,
secondDomain.CreateInstance("AssemblyA", "AssemblyA.Demo", true,
System.Reflection.BindingFlags.CreateInstance, null,
new object[] { 7, 3 }, ...
3
votes
2answers
75 views
Getting a list of all available namespaces in an AppDomain
I need to 'scan' the active AppDomain for all loaded assemblies at run time and get a list of unique namespaces available in those assemblies, does .NET support that?
The code must execute during the ...
0
votes
2answers
42 views
Running Service In Second AppDomain
I have an object that I am instantiating into its own AppDomain. The main reason for this is that it calls into code that I don't control (third party dll) and if I need to Abort the thread, I can do ...
0
votes
0answers
40 views
Multiple worker add-ins with multiple AppDomains possible?
I use System.AddIn in .Net 3.5 for isolation. I execute risky code in separate worker add-in processes, which means that i use the AddIn.Activate with a process parameter for each worker. The problem ...
0
votes
2answers
101 views
AppDomain.CurrentDomain.UnhandledException does not let me finish my function
Currently, I have a method that is called when there is an unhandled exception. All this does is log the exception to a dump file. However, the streamwriter does not write the full information I'd ...
0
votes
1answer
159 views
Get All Processes With Their Corresponding App Domains
Is it possible to get a list of the running processes along with their corresponding app domains when running a program? I am aware mscoree.dll allows me to retrieve all App Domains of the current ...
2
votes
2answers
104 views
Is there an equivalent of AppDomain.AssemblyResolve in windows store apps?
I want to attach to the AppDomain.AssemblyResolve event in a "Windows Store" App. But AppDomain doesn't exist.
Is there an alternative way to get the same functionality?
1
vote
0answers
82 views
Unable to access loaded assemblies across AppDomains
Give this load assembly code:
public class LoadAssembly : MarshalByRefObject, ILoadAssembly
{
private readonly AppDomain currentDomain;
public LoadAssembly()
{
currentDomain = ...
3
votes
5answers
129 views
How to write code to be executed BEFORE any method in an assembly?
There is an event AppDomain.CurrentDomain.DomainUnload which allows to clean up static resources which are independent of any particular instance of class and even of any particular class.
I consider ...
0
votes
2answers
212 views
How to launch multiple instances of a console application in separate app domains?
I have a console application A and console application B.
Is it possible to launch multiple instances of B from A. It is important that each instance of console application B to be run in its own app ...
2
votes
0answers
81 views
How to run multiple service instances in different AppDomains?
I have implemented a windows service.
How should I run multiple instances of the service, each in its own AppDomain ?
1
vote
0answers
55 views
Temp AppDomain and File Locking
I have successfully created a class that inherits from MarshallByRefObject.
The above class also implements an interface and is invoked remotely from the main AppDomain. DTOs were also created to ...
1
vote
0answers
175 views
Trying to fake a Strong Named Assembly, but “manifest definition does not match”
I'd like to intercept the communication between a plug-in and a host assembly.
I've tried to load ThirdPartyPlugin.dll into an AppDomain sandbox (code below), to intercept its attempts at loading of ...
0
votes
1answer
114 views
Run a codeCom code in AppDomain in .NET Framework 4.0
How can I run the compiled code in the current AppDomain in NET Framework 4.0? Below the code that works in net framework 3.5, but objCompilerParameters.Evidence is obsolete in NET Framework 4.0 so ...
0
votes
1answer
118 views
Get the control of AppDomain.CurrentDomain object in application
I need to set the current AppDomain to what I create.
I want to Log my application exception using Enterprise Library HandleException method. When I handle the exception, it will insert a log into a ...
1
vote
0answers
65 views
Can Only Dll reside in different application domain without Executable
I have developed a console application which uses math.dll for all of its mathematical calculation. By default when I create instance of class of this dll in my executable application it get loaded ...
4
votes
1answer
154 views
Creating second-level AppDomain hangs
I have two assemblies with Main methods.
The first one executes the other.
The second assembly creates an object in a new AppDomain.
That object is about to create a file or print something on the ...
0
votes
0answers
144 views
AppDomain ExecuteAssembly of WPF app close as expected
I am launching a WPF application in a secondary AppDomain using the API "ExecuteAssembly" in a background thread. When this secondary application is closed (e.g. user closes main window), I have ...
6
votes
1answer
221 views
Exception on receiving Assembly reference from another AppDomain
I am loading all DLLs from a specific "extensions" directory in a new AppDomain to get some Reflection related information out of those.
This is what I'm trying:
I created a new library ...