LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Debug a deployed web service on remote computer (remote web server). is possible?

My Web service is working fine in my development computer. However I'm going to deploy & host it in a different computer which has NI Web Server, G Web and LabVIEW runtime (but not LabVIEW development).

 

My question are:

  1. can I debug the webservice on that remote server from my development computer?
  2. If yes, how could I enable the debugging mode ?
  3. If no, if I found some wired web service behavior on remote server while it working fine in development mode, how could we figure out?

 

0 Kudos
Message 1 of 9
(2,514 Views)

@ThamS wrote:
  1. can I debug the webservice on that remote server from my development computer?

It should be possible. Of course, firewall settings etc. should enable this.

 

@ThamS wrote:

2. If yes, how could I enable the debugging mode ?


In the build spec, Advanced tab, there's an option (the first) "Enable Debugging". VI server access should also be configured. Search for 'debugging remote application' and such.

 

I'd suspect web services are a hell to debug though.

 

@ThamS wrote:

3. If no, if I found some wired web service behavior on remote server while it working fine in development mode, how could we figure out?

The big question is: is this due to the development mode, or is it caused by running the application on another system?

 

All sorts of things could be wrong, firewalls, IP conflicts, etc.

 

Does the executable have proper error handling? E.g. if there's a problem starting the web service, will you know?

 

First step is usually to check if you can ping the system...

Next, is there any kind of contact? If not why not?

0 Kudos
Message 2 of 9
(2,479 Views)

wiebe@CARYA wrote:

In the build spec, Advanced tab, there's an option (the first) "Enable Debugging". VI server access should also be configured. Search for 'debugging remote application' and such.

To me it sounds like debugging LabVIEW application (.exe) on remote computer. Does it work the same way for Web Service application?

 

is there any further Guidance (i.e. step-by-step example) for doing this "remote debuging for web service applicaiton remote NI web server"?

 


wiebe@CARYA wrote:

The big question is: is this due to the development mode, or is it caused by running the application on another system?

 

All sorts of things could be wrong, firewalls, IP conflicts, etc.

 

Does the executable have proper error handling? E.g. if there's a problem starting the web service, will you know?

 

First step is usually to check if you can ping the system...

Next, is there any kind of contact? If not why not?


Actually I'm preparing to  deploy the application (distribution package) containing web service to run on another system (target computer) in runtime mode.
thus I need to make sure what should I prepare to my build specification and other method or tools (If any), for me to debug my webservice there (on the target computer with run-time only)

 

Technical network issue (e.g. IP address, ping) is already considered. yeah.
NI Web Server is also configured, and I already could open the NI web server page running on the remote target computer from my development computer.


but firewall (e.g. network port to allow open) where could I find to know which port should be open?

(especially for web service remote debugging)

0 Kudos
Message 3 of 9
(2,467 Views)

@ThamS wrote:

wiebe@CARYA wrote:

In the build spec, Advanced tab, there's an option (the first) "Enable Debugging". VI server access should also be configured. Search for 'debugging remote application' and such.

To me it sounds like debugging LabVIEW application (.exe) on remote computer. Does it work the same way for Web Service application?

 

is there any further Guidance (i.e. step-by-step example) for doing this "remote debuging for web service applicaiton remote NI web server"?


I actually don't know. I did assume you're building an exe with web service, and that debugging that executable would help.

 

The way web services work in LabVIEW is so weird, the one time I needed it, I used .NET to make my own web service server (which is actually 2 nodes). Of course you have to handle all incoming requests, but for me that was easier that figuring out how to work with NI's web services.

0 Kudos
Message 4 of 9
(2,455 Views)

@ThamS wrote:

but firewall (e.g. network port to allow open) where could I find to know which port should be open?

(especially for web service remote debugging)


IIRC, web services are simply http or https traffic, so port 80 and\or 8080?

 

I don't think there's a remote debugging port, except for debugging a LV exe.

 

You should be able to test web service requests in a local browser (or CURL) on the local PC (test on development first). That would determine if the remote connection is the problem. It could still be a FW problem, but you could pull out your cable and temporarily disable the FW.

0 Kudos
Message 5 of 9
(2,453 Views)

 

I don't meant to create a stand alone Application web server (exe). 

Because my Webservice doesn't need any Top VI. It's only will receive HTTP-Post Request from web client devices and convert their data into systemlink tags in the G Web Server application (like Systemlink)

 

According to LabVIEW Help document, if we host web service in the application web server, it will requires a top VI and the web service will only start when the application is running and stop otherwise. 

 

So I'm considering to host the webservice in the NI Web Server on the remote target Computer (server).

But I need to know How to debug it, when necessary, from my development computer?

 

 

NB: As mentioned previously, the target computer (web server host) doesn't have LabVIEW development ( but runtime).

 

0 Kudos
Message 6 of 9
(2,415 Views)

@ThamS wrote:

According to LabVIEW Help document, if we host web service in the application web server, it will requires a top VI and the web service will only start when the application is running and stop otherwise. 

 

So I'm considering to host the webservice in the NI Web Server on the remote target Computer (server).

But I need to know How to debug it, when necessary, from my development computer?


OK, that's out of my league of expertise (and interest).

 

IIRC, the webservice (at least it's workhorse) is a .NET assembly (.dll or .exe, although they might have renamed it to .lvws or something).

 

Now this assembly, you can debug. You can monitor .NET events (Event Tracing for Windows), or even open (and run, debug) the assembly in a .NET debugger like dnSpy.

 

If it is a genuine .NET webservice, things like How to debug a web service in a C#/.NET solution from a web application - Stack Overflow and\or Debugging a webservice (microsoft.com) might apply.

 

I don't know how this will turn out for a LabVIEW webservice...

0 Kudos
Message 7 of 9
(2,339 Views)

wiebe@CARYA wrote:
IIRC, the webservice (at least it's workhorse) is a .NET assembly (.dll or .exe, although they might have renamed it to .lvws or something).

 

Now this assembly, you can debug. You can monitor .NET events (Event Tracing for Windows), or even open (and run, debug) the assembly in a .NET debugger like dnSpy.


Wow, it sounds interesting. I'm used to debug .NET application (C# based) running on remote target computer.

 

But then, the problem is, I don't know where to find the LabVIEW web service file when it is store-in and running under NI Web server. 

any idea?

0 Kudos
Message 8 of 9
(2,211 Views)

@ThamS wrote:

wiebe@CARYA wrote:
IIRC, the webservice (at least it's workhorse) is a .NET assembly (.dll or .exe, although they might have renamed it to .lvws or something).

 

Now this assembly, you can debug. You can monitor .NET events (Event Tracing for Windows), or even open (and run, debug) the assembly in a .NET debugger like dnSpy.


Wow, it sounds interesting. I'm used to debug .NET application (C# based) running on remote target computer.

 

But then, the problem is, I don't know where to find the LabVIEW web service file when it is store-in and running under NI Web server. 

any idea?


When building an exe with webserive, the preview shows a .lvws file. That could be it.

 

But frankly, I don't know how to do what you're doing.

0 Kudos
Message 9 of 9
(2,203 Views)