Jump to content

Calling a .NET function on another machine (LV and T-stand)


Recommended Posts

A few years ago I saw a demo at NI Week where they called a .NET library on a remote computer. In the case I am thinking of, they just farmed out a calculation, but I would like to call a function that interacts with a USB device.

I found some articles on .NET remoting, but that appears to require us to recompile the .NET assembly with some remote server built in, which is not possible.

Essentially, I would like to make calls to this assembly on a remote machine much the same way you can do using a remote COM call. And I need to be able to do this both from LV (8.2) and from TestStand (4.1).

Does anyone know whether this is possible, and point to any examples or search terms (It's got to be out there, but I must be using the wrong keywords!).

Thank you,

Jed

Link to comment

It might be possible but I have some doubts. There are several reasons why it might not be possible to make a normal .Net assembly remotable.

1) Security! It is always an inherent risk to allow that with arbitrary components. If you create a component specifically to allow that you hopefully take measures to make it really secure but if you can do that with any component, chances are high that there will be some security holes in one way or the other.

2) Complexity! While it is possible to do that with most COM objects (ActiveX servers) there have very few people been able to make it work and even less to make it reliably work. The issue here is that you do need some form of security in place and getting that security configured just right is a very daring task.

Even configuring Windows networking can be already an interesting task. In my experience, while I could see more or less any computer on the network in Windows 95 I have nowadays regularly problems to see computers that I have actually explicitedly setup with login and all to be accessible. And suddenly I can see them one day and suddenly they are gone.

Rolf Kalbermatter

Link to comment

Any possibility that you could use a web service instead of a direct .NET call?

This would essentially wrap your .NET call into a local process, which can hand off safer payloads of XML (or JSON or whatever) across the network.

It can be quite a bit simpler as well... though, if you have a restrictive IT department, it can run into human problems due to the need for a web server frusty.gif

Joe Z.

Link to comment

Hi Rolf,

This is for a Validation test and the system can be sandboxed, so there is no security issue.

As for complexity, what I need to do is to talk to two of these devices simultaneously. However, their implementation will not allow this. So now we are looking at having two PCs running and synching our calls.

Their test system is LV + TestStand, but the .NET control is extensive and already implemented in TS; so VI server is not a good option. I was hoping it would be easy to modify the TS sequence to perform the calls remotely.

It might be possible but I have some doubts. There are several reasons why it might not be possible to make a normal .Net assembly remotable.

1) Security! It is always an inherent risk to allow that with arbitrary components. If you create a component specifically to allow that you hopefully take measures to make it really secure but if you can do that with any component, chances are high that there will be some security holes in one way or the other.

2) Complexity! While it is possible to do that with most COM objects (ActiveX servers) there have very few people been able to make it work and even less to make it reliably work. The issue here is that you do need some form of security in place and getting that security configured just right is a very daring task.

Even configuring Windows networking can be already an interesting task. In my experience, while I could see more or less any computer on the network in Windows 95 I have nowadays regularly problems to see computers that I have actually explicitedly setup with login and all to be accessible. And suddenly I can see them one day and suddenly they are gone.

Rolf Kalbermatter

Link to comment

Hi Rolf,

This is for a Validation test and the system can be sandboxed, so there is no security issue.

As for complexity, what I need to do is to talk to two of these devices simultaneously. However, their implementation will not allow this. So now we are looking at having two PCs running and synching our calls.

Their test system is LV + TestStand, but the .NET control is extensive and already implemented in TS; so VI server is not a good option. I was hoping it would be easy to modify the TS sequence to perform the calls remotely.

Check out WCF (Windows Communication Foundation). It's designed to allow easy and abstracted network communication using .NET classes and interfaces. It's pretty extraordinary technology if you have some C# or VB.NET skills.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.