I ran a simple system.net.httpClient() with url and parameters.
It worked when using a script console in designer but when I pasted the script to e.g. a button in a view or on gateway events and execute it, http connection will time out. What am i missing here?
Windows gateway? Firewall perhaps. Or no network privileges for the gateway service.
@pturmel thank you for your help.
Sorry our IT department is managing the server that ignition is installed and I have minimal knowledge about the network.
Could you please explain why I get response when I execute on script console and not when I try to execute it on a e.g. component script or gateway script? And what shall I ask our IT department to look into if networking is the issue?
I don’t do much with windows servers, but default service accounts have historically had limited network permissions. Anything that runs in a tag event, gateway event, or Perspective script is actually running in the gateway’s service, and such limits would apply. The designer’s script console, like Vision clients, are running your script directly (local to your computer, not the gateway), and therefore get to use your normal client permissions for networking access (filesystem, too).
Thank you for the explanation @pturmel.
I tried it running on vision script and it worked. will contact our IT to check out the gateway permission.