S
shanmani
Hi,
I am developing a .NET application which will invoke the methods from
different COM / .NET DLLs. While invoking methods from .NET DLLs, I am
encountering the following error. I have also included the detail of the
error stack trace and the code that I have written to invoking the methods.
I would appreciate if you could let me know the cause of this error and
possible workarounds to avoid this situation.
Error Message
-------------
Cannot load type OrchServerSync.ASrvrSync, OrchServerSync, Version=3.0.6.0,
Culture=neutral, PublicKeyToken=5552a996b9dd0e5d.
Error StackTrace
----------------
at System.Runtime.Remoting.RemotingServices.GetOrCreateProxy(Identity idObj,
Object proxy, Boolean fRefine)\r\n at
System.Runtime.Remoting.RemotingServices.InternalUnmarshal(ObjRef objectRef,
Object proxy, Boolean fRefine)\r\n at
System.Runtime.Remoting.RemotingServices.Unmarshal(ObjRef objectRef)\r\n
at
System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Type
serverType)\r\n at
System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type
serverType, Object[] props, Boolean bNewObj)\r\n at
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly)\r\n at
System.Activator.CreateInstance(Type type, Boolean nonPublic)\r\n at
System.Activator.CreateInstance(Type type)
Code used for Invoking:
----------------------
object retObj = null;
Type Obj = Type.GetTypeFromProgID(sClassName);
object ObjMsp = Activator.CreateInstance(Obj);
retObj = Obj.InvokeMember(sMethodName, BindingFlags.InvokeMethod, null,
ObjMsp, null);
System.Runtime.InteropServices.Marshal.ReleaseComObject(ObjMsp);
Thanks in advance
Dhandapani
I am developing a .NET application which will invoke the methods from
different COM / .NET DLLs. While invoking methods from .NET DLLs, I am
encountering the following error. I have also included the detail of the
error stack trace and the code that I have written to invoking the methods.
I would appreciate if you could let me know the cause of this error and
possible workarounds to avoid this situation.
Error Message
-------------
Cannot load type OrchServerSync.ASrvrSync, OrchServerSync, Version=3.0.6.0,
Culture=neutral, PublicKeyToken=5552a996b9dd0e5d.
Error StackTrace
----------------
at System.Runtime.Remoting.RemotingServices.GetOrCreateProxy(Identity idObj,
Object proxy, Boolean fRefine)\r\n at
System.Runtime.Remoting.RemotingServices.InternalUnmarshal(ObjRef objectRef,
Object proxy, Boolean fRefine)\r\n at
System.Runtime.Remoting.RemotingServices.Unmarshal(ObjRef objectRef)\r\n
at
System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Type
serverType)\r\n at
System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type
serverType, Object[] props, Boolean bNewObj)\r\n at
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly)\r\n at
System.Activator.CreateInstance(Type type, Boolean nonPublic)\r\n at
System.Activator.CreateInstance(Type type)
Code used for Invoking:
----------------------
object retObj = null;
Type Obj = Type.GetTypeFromProgID(sClassName);
object ObjMsp = Activator.CreateInstance(Obj);
retObj = Obj.InvokeMember(sMethodName, BindingFlags.InvokeMethod, null,
ObjMsp, null);
System.Runtime.InteropServices.Marshal.ReleaseComObject(ObjMsp);
Thanks in advance
Dhandapani