# .NET Remoting with IronRuby 0.9.2

**URL:** <https://www.ruby-forum.com/t/net-remoting-with-ironruby-0-9-2/178807>\
**Category:** IronRuby\
**Created:** [November 11, 2009, 4:05pm UTC](https://www.ruby-forum.com/t/net-remoting-with-ironruby-0-9-2/178807 "2009-11-11T16:05:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patrick\_Brown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e9a140/32.png) [@Patrick\_Brown](https://www.ruby-forum.com/u/Patrick_Brown)\
**Post date:** [November 11, 2009, 4:05pm UTC](https://www.ruby-forum.com/t/net-remoting-with-ironruby-0-9-2/178807/1 "2009-11-11T16:05:34Z")

</div>

Hello

Has anyone been able to get Remoting to work? I get the following  
exception when attempting to make a call. I am rather new to IronRuby  
but  
believe my code should work, I converted a very simple snippit of  
working C#  
code to IronRuby and can’t seem to get it to work. I put breakpoints in  
the  
.NET assemblies and watch each step complete successfully until the  
service.SelectPolicies call.

mscorlib:0:in `HandleReturnMessage': Cannot load type 'IronRuby.Runtime.IRubyObj ect, IronRuby, Version=0.9.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 '. (System::Runtime::Remoting::RemotingException) from mscorlib:0:in`PrivateInvoke’  
from Microsoft.Scripting.Core:0:in `BindCore' from Microsoft.Scripting.Core:0:in`Bind’  
from ./PropertyPolicy.rb:34:in `GitSomePolicies’  
from main.rb:5

IronRuby snippit

RemotingConfiguration.Configure(“Configuration\ClientRemotingConfiguration.config”,  
false)

service =  
DIContainer.Instance.method(:Resolve).of(IPropertyPolicyService).call()  
types = DIContainer.Instance.method(:Resolve).of(ILookupInfos).call();  
types.Add(DIContainer.Instance.method(:Resolve).of(ICodeListInfoBuilder).call().Build(“AP”,

CodeValueAttribute.GetDescription(PolicyType.AllPacPolicy), “”, 0,  
DateTime.Now, DateTime.Now))

policies = service.SelectPolicies(types)

Thanks,  
Patrick

---

<div class="post-metadata">

**Author:** ![Patrick\_Brown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e9a140/32.png) [@Patrick\_Brown](https://www.ruby-forum.com/u/Patrick_Brown)\
**Post date:** [November 26, 2009, 5:41am UTC](https://www.ruby-forum.com/t/net-remoting-with-ironruby-0-9-2/178807/2 "2009-11-26T05:41:58Z")

</div>

Hi Patrick

did you find a solution to your problem?  
I got exactly the same problem while trying to call .NET remote method.

thanks  
Dong

Patrick Brown wrote:

> Hello
> 
> Has anyone been able to get Remoting to work? I get the following  
> exception when attempting to make a call. I am rather new to IronRuby  
> but  
> believe my code should work, I converted a very simple snippit of  
> working C#  
> code to IronRuby and can’t seem to get it to work. I put breakpoints in  
> the  
> .NET assemblies and watch each step complete successfully until the  
> service.SelectPolicies call.
> 
> mscorlib:0:in `HandleReturnMessage': Cannot load type 'IronRuby.Runtime.IRubyObj ect, IronRuby, Version=0.9.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 '. (System::Runtime::Remoting::RemotingException) from mscorlib:0:in`PrivateInvoke’  
> from Microsoft.Scripting.Core:0:in `BindCore' from Microsoft.Scripting.Core:0:in`Bind’  
> from ./PropertyPolicy.rb:34:in `GitSomePolicies’  
> from main.rb:5
> 
> IronRuby snippit
> 
> RemotingConfiguration.Configure(“Configuration\ClientRemotingConfiguration.config”,  
> false)
> 
> service =  
> DIContainer.Instance.method(:Resolve).of(IPropertyPolicyService).call()  
> types = DIContainer.Instance.method(:Resolve).of(ILookupInfos).call();  
> types.Add(DIContainer.Instance.method(:Resolve).of(ICodeListInfoBuilder).call().Build(“AP”,
> 
> CodeValueAttribute.GetDescription(PolicyType.AllPacPolicy), “”, 0,  
> DateTime.Now, DateTime.Now))
> 
> policies = service.SelectPolicies(types)
> 
> Thanks,  
> Patrick

---

<div class="post-metadata">

**Author:** ![Patrick\_Brown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e9a140/32.png) [@Patrick\_Brown](https://www.ruby-forum.com/u/Patrick_Brown)\
**Post date:** [November 27, 2009, 6:02pm UTC](https://www.ruby-forum.com/t/net-remoting-with-ironruby-0-9-2/178807/3 "2009-11-27T18:02:05Z")

</div>

Hi Dong

Unfortuantly not, it is an issue I am going to come back to and  
really  
want to get to work but I temporarily dropped it so I could move forward  
on  
learning the tools and language.

Thanks,  
Patrick
