.NET Remoting
Show older comments
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 Comments
Walter Roberson
on 2 Sep 2011
If that is an IP address, then the .890 part is invalid. IP addresses in quad form have a maximum of 255 in any component.
;-)
Jim C
on 2 Sep 2011
Kaustubha Govind
on 6 Sep 2011
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
on 6 Sep 2011
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.
Answers (0)
Categories
Find more on Get Started with Microsoft .NET in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!