.NET Framework Bookmark and Share   
 index > .NET Remoting and Runtime Serialization > AppDomain Proxy MarshalByRefObject Serialization woes
 

AppDomain Proxy MarshalByRefObject Serialization woes

I have a web app that needs to load plugins. This is not a high-traffic web-site. I have an assembly (myproxy.dll)with a proxy class(inherits from MarshalByRefObject). This proxy assembly only references the System assembly. I added the proxy assembly as a reference to the web application dll (webapp.dll). So I have:

webapp.dll:

references myproxy.dll and other system dlls

myproxy.dll assembly:

references System assembly and nothing else

From webapp.dll (default appdomain), I attempt to run the following code:


Dim dom As AppDomain = Nothing
Try
dom = AppDomain.CreateDomain("PluginProxy_Domain")
Dim proxy As PluginProxy.ProxyClass = _
CType(dom.CreateInstanceAndUnwrap(GetType(PluginProxy.ProxyClass).Assembly.FullName, _
GetType(PluginProxy.ProxyClass).FullName), PluginProxy.ProxyClass)
proxy.callProxyMethod(PluginFile, AssemblyName, TypeName)
Catch ex As Exception
Finally
If IsNothing(dom) = False Then
AppDomain.Unload(dom)
End If
End Try

If I run the code seen above, an exception is thrown (iam running under the debugger)indicating that webapp.dll could not be found. Why is the CreateInstanceAndUnwrap call trying to load the webapp.dll? I do not reference that dll from the proxy assembly (no dependencies on webapp.dll). I am confused at the moment. Any help would be great. Thanks.
pbergeron
may be use "webapp" .
don't include ".dll"

good luck
MVP 2004
Kevinst Wu

You can use google to search for other answers

Custom Search

More Threads

• Binary Serialization behavior differs with Enterprise Library installed
• TCP Channel not closing...
• error reflecting type ?
• Remoting header
• Cannot load type exception
• Remoting - Can not call method or property of Client Activated Remote Object
• TcpChannel in unreliable networks.
• Events over remoting.
• How many clients
• remoting permissioning mystery