Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

ASP .NET web charting example

Hi Ben,

Did you already review the Deploying Measurement Studio Web Applications help topic and then use the Measurement Studio .NET XCOPY Deployment Files table to ensure all the assemblies are located on the target machine? Your assumption sounds correct so lI would suggest reviewing those help topics.

If you have questions after that, let us know. 

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 11 of 18
(3,198 Views)
I'm still working on deploying my ASP .NET / Measurement Studio Application. I was able to get my application to compile but my web site host (www.hostmysite.com ) blocks communication on all but a handful of ports (ports 2343 and 6000-6010 needed for network variable communication are blocked). An ASP .NET virtual private server would be approximately $1000+, which would make the technology prohibitively expensive for us as an academic research group. What is the least expensive way that you can recommend to deploy my ASP .NET / Measurement Studio application? Any helpful suggestions would be greatly appreciated.
Thanks,
Ben  
0 Kudos
Message 12 of 18
(3,144 Views)
Hello Ben,

Without having access to these ports, it will not be possible to run the application.  The first approach that I would take would be to try and contact your hosting company with a list of the ports that you will need and reasons why and see if they would be willing to open these ports for you.

If that is not an option on the shared hosting plan, then a Windows VPS will be the route that you will need to take.  I just looked at the website for the webhost you mentioned in your post, and the Base VPS looks as though it would work and it would be less than $500 a year based on what was listed on that website.  Additionally, a quick google search also returned a few other Windows VPS service providers that had plans for around $40 a month as well.

ASP.NET / Measurment Studio applications that require additional ports to be open due to their use of additional communications methods such as shared variables will require a higher level of customization on the server side, and as such, will sometimes surpass the abilities that are provided by low cost shared hosting plans.
0 Kudos
Message 13 of 18
(3,124 Views)
Hello,
I have got my NI Network Variable / Charting Website up on the web on a new server that purportedly does not block any ports for web app communication  - discountasp.net . I included the following DLL's in my bin folder:
NationalInstruments.Common.dll
NationalInstruments.Common.Native.dll
NationalInstruments.NetworkVariable.dll
NationalInstruments.UI.dll
NationalInstruments.UI.WebForms.dll
and I'm getting no compile errors (no nasty ASP .NET error pages) after I publish my web site to the server.
My Windows application and Variable Manager are running on the computer in the lab, and there is a NetworkVariableDataSource on the web site.
The problem is that when I call:
double[] webData = new double[4];
webData = (double[])NetworkVariableDataSource1.Bindings[0].GetValue();
it always throws a InvalidCastOperation on the web server, cannot convert system.string to system.double[]. The returned string is "1". The code works fine (no exception is thrown) when the web site is running on the local machine or at another point on my LAN, so I assume that there's a firewall issue. I checked on the lab computer and I have lksock.dll version 4.9.0.49155 . I had my network administrator unblock access to the lab computer over TCP and UDP ports 2343 and 6000-6010 for the IP address of the web server, and we went through a manually unblocked those ports for UDP access using the firewall.cpl utility on the lab computer. What further steps do you recommend taking to get my NetworkVariable web app to work?
Thanks,
Ben
 
0 Kudos
Message 14 of 18
(3,032 Views)
Hi Ben,

This error is not related to the firewall.  What appears to be happening is that an error is occuring when attempting to cast the network variable object from a string into a double array.  What happens if you replace the code you posted with this code?
string webData;
webData = NetworkVariableDataSource1.Bindings[0].GetValue();
If this code snippet does not throw an error, then the problem is that the server that is running your ASP.NET application is throwing an exception when converting from a string into a double array.  This could be some kind of limitation or misconfiguration on the web server as your tests indicated that it worked on your local machines.  If that is the case, we will need to determine a different way to convert the string that is returned to a double array, instead of using the default type casting that you are utilizing now.
0 Kudos
Message 15 of 18
(3,011 Views)
I do not know the internal workings of the NetworkVariableDataSource class, but when I call

object obj = NetworkVariableDataSource1.Bindings[0].GetValue();

double [] data = new double[4];

data = (double[])obj;

and the last statement throws a InvalidCastOperation, this means that there is a network communication error whether its happening on the web server or on a computer on my LAN with the ethernet cable unplugged.

In TCPView, a Windows Utility, I see that VarMan.exe (Variable Manager version 8.2.1) is listening for TCP connections on port 1544, and when I connect to the Network Variable over my LAN, I see a TCP connection over port 1544 . This socket connection behavior is different than that described in

Configuring Firewalls and Network Address Translating Routers for Shared Variables

My question to National Instruments is this: what (TCP or UDP) ports do I need to tell my network administrator to open for my Network Variable web application to run correctly on a remote web server?

0 Kudos
Message 16 of 18
(2,994 Views)
Dear National Instruments,
 
My current ASP.NET application plots data on four WaveformGraph's 1/sec for each web client which leads to a lot of bandwidth usage (~4kb/s) and excessive burden on the server.
I need an AJAX-compatible Chart control that exposes JavaScript methods for client-side plotting of data.
Is there anything in works at National Instruments? If not, would you recommend an AJAX compatible chart control to extend the functionality of my Measurement Studio application ?
 
Thanks,
Ben
 
0 Kudos
Message 17 of 18
(2,755 Views)

Hello Ben,

What version of Measurement Studio do you have?  As of Measurement Studio 8.5, our controls are AJAX compatible.  Refer to http://www.ni.com/mstudio/whats_new.htm for more information on what's new in Measurement Studio 8.5.

 
Regards,


Marty H.
National Instruments
0 Kudos
Message 18 of 18
(2,708 Views)