.net to invoke a Speech Server workflow in a non-local application domain

I am using the Microsoft Speech Server application based on the Windows Workflow Foundation. The application manages other helper applications - users come in and the manager downloads the assembly containing the correct application and invokes the workflow.

The problem I am facing is that speech serves or iis how to block the assembly in memory, preventing me from overwriting the DLL. This is painful to debug the application, but will also be completely unacceptable once the application is deployed for production.

It is not possible to manually unload one specific assembly - the assembly is unloaded only when their parent application domain is unloaded.

So I am trying to use a remote .net network to create a new application domain, upload an assembly to that domain, create a workflow object through a proxy, and then I want to pass that proxy.

This is the code for the type I am trying to create. This is in the assembly I'm trying to load:

public class typeContainer : MarshalByRefObject
{
    public static Type workflowType = typeof(mainWorkflow);
}

      

And here is the code in the manager:

AppDomain newDomain = AppDomain.CreateDomain("newdomain");
System.Runtime.Remoting.ObjectHandle oh = newDomain.CreateInstanceFrom(
                @"FullPathToAssembly",
                "namespace.typeContainer");
object unwrapped = oh.Unwrap();

      

So the question is, how can I access the typeContainer.workflowType in the manager? o.Unwrap () gives the type _TransparentProxy.

0


source to share


1 answer


Simply put, what I am trying to do above is not possible. In short, submitting a type via AppDomains results in an assembly injection into the current domain. For an alternative solution see this post .



0


source







All Articles