See the question and my original answer on StackOverflow

This happens because you're using the dynamic keyword which will trigger all sorts of calls from .NET. The corresponding code is this (found in .NET reference source):

/// <summary>
/// Creates a meta-object for the specified object. 
/// </summary>
/// <param name="value">The object to get a meta-object for.</param>
/// <param name="expression">The expression representing this <see cref="DynamicMetaObject"/> during the dynamic binding process.</param>
/// <returns>
/// If the given object implements <see cref="IDynamicMetaObjectProvider"/> and is not a remote object from outside the current AppDomain,
/// returns the object's specific meta-object returned by <see cref="IDynamicMetaObjectProvider.GetMetaObject"/>. Otherwise a plain new meta-object 
/// with no restrictions is created and returned.
/// </returns>
public static DynamicMetaObject Create(object value, Expression expression) {
    ContractUtils.RequiresNotNull(expression, "expression");

    IDynamicMetaObjectProvider ido = value as IDynamicMetaObjectProvider;
    if (ido != null && !RemotingServices.IsObjectOutOfAppDomain(value)) {
        var idoMetaObject = ido.GetMetaObject(expression);

        if (idoMetaObject == null ||
            !idoMetaObject.HasValue ||
            idoMetaObject.Value == null ||
            (object)idoMetaObject.Expression != (object)expression) {
            throw Error.InvalidMetaObjectCreated(ido.GetType());

        return idoMetaObject;
    } else {
        return new DynamicMetaObject(expression, BindingRestrictions.Empty, value);

{B86A98CC-DCC0-3205-8777-7911A07DAAAF} is the (auto generated) IID of IDynamicMetaObjectProvider, i.e: typeof(IDynamicMetaObjectProvider).GUID. It's a pure managed interface so it's not useful from native code.

To find that, just look at the call stack, but make sure your thread apartement type is compatible with your object otherwise you'll get RPC remoting "useless" stack.

In my case I had to add the STAThread attribute on the .NET method:

enter image description here