Remoting: what does this error mean/how2 fix?: __identity System.Runtime.Remoting.RemotingException: Remoting cannot find field '__identity' on type 'System.MarshalByRefObject'.

trying to use appdomain.createinstancefromandunwrap and am getting the following errors:

+            __identity      System.Runtime.Remoting.RemotingException: Remoting cannot find field '__identity' on type 'System.MarshalByRefObject'.
   at System.Object.GetFieldInfo(String typeName, String fieldName)
   at System.Object.FieldGetter(String typeName, String fieldName, Object& val)
   at System.Object.FieldGetter(String typeName, String fieldName, Object& val)
   at System.RuntimeFieldHandle.GetValue(Object instance, RuntimeTypeHandle fieldType, RuntimeTypeHandle declaringType, Boolean& domainInitialized)
   at System.Reflection.RtFieldInfo.InternalGetValue(Object obj, Boolean doVisibilityCheck, Boolean doCheckConsistency)
   at System.Reflection.RtFieldInfo.GetValue(Object obj)
   at Microsoft.Office.Tools.Debugger.Tools.TryCreateDebuggerItem(MemberInfo member, Object target, __Item& item)      System.Runtime.Remoting.RemotingException
+            Identity      System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.Serialization.SerializationException: Type 'System.Runtime.Remoting.ServerIdentity' in assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.
   at System.MarshalByRefObject.get_Identity()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
   at Microsoft.Office.Tools.Debugger.Tools.TryCreateDebuggerItem(MemberInfo member, Object target, __Item& item)      System.Reflection.TargetInvocationException


what is wrong?

g
DevPPCAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kaylanreilorCommented:
You don't say a lot...
Let's read Ingo's proposition here : http://www.dotnet247.com/247reference/msgs/18/92223.aspx
Or, there is a very complete article there : http://www.codeproject.com/KB/IP/remotingprobe.aspx
DevPPCAuthor Commented:
What would you like to see?

I want to ability to shutdown particular plugins (usercontrol dlls) started by a flavor of createinstance.  Since one cannot unload a particular assembly, I am creating unique appdomains for each dll I want to start (then to shutdown later I unload the appdomain).  The literature is limited on CreateInstance implementations of Appdomain but the one I found closest is CreateInstanceFromandUnwrap.  When I first tried that I get serialization errors so I have implemented ISerializable per MSDN examples.

But I still get this missing Identity problem.


If you know of a better way to accomplish what I hope for, please suggest them!

thanks!

george

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Languages-Other

From novice to tech pro — start learning today.