.NET Remoting

11 次查看(过去 30 天)
Jim C
Jim C 2011-9-2
Using Matlab 2011A, I need to access a remote app that exposes a .NET Remoting inteface.
Here's what I'm doing:
function ConnectRemoteApp()
NET.addAssembly('C:\work\MyCo.Remote.dll');
import MyCo.Remote.*
remoteApp = RemoteUtilities.GetRemoteApp('123.45.67.890');
result = remoteApp.AppName;
Note: Remote.dll contains: (1) implementation of static GetRemoteApp method which returns object implementing IRemoteApp interface (2) declaration of IRemoteApp interface which specifies AppName property
When I execute this function, Matlab says remoteApp has no methods or properties. I know the Remote.dll is good because I can use it from a C# client.
What am I missing?
Thank you.
  4 个评论
Kaustubha Govind
Kaustubha Govind 2011-9-6
Are you able to use other .NET libraries? For example, from the documentation:
NET.addAssembly('System.Speech')
speak = System.Speech.Synthesis.SpeechSynthesizer;
speak.Volume = 100;
speak.Speak('This is a test')
Pierre
Pierre 2011-9-6
If you can use other .Net libraries successfully, you might want to check which *.cfg file is being used in a MATLAB context... I'm no more sure about this since I used .Net Remoting quite some time ago, but isn't the connection properties, layers, protocols, contracts, etc. configured according to a config file "next to" the application assembly, so using the same library from a different context (in particular MATLAB instead of a test client application with the correct connection properties) might read property settings from a different source.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Microsoft .NET 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by