Error 363650 Cross-Origin Resource Sharing in G Web Development Software

Updated Dec 30, 2024

Reported In

Software

  • G Web Development Software
  • LabVIEW

Issue Details

  • I am receiving the following error when trying to communicate with a LabVIEW Web Service in G Web Development Software
Error-363650
A network error has occurred. Possible reasons for this error include Cross-Origin Resource Sharing (CORS) configuration issues between the client and the target server or that the client cannot reach the target server. Due to browser security restrictions, detailed information about the cause of the network error cannot be provided. You may find specific details about the cause of the network error in the browser development tools console or in the LabVIEW output window.
 

Solution

When using G Web Development Software to make HTTP requests, two primary factors could return error 353650.
 

  • Missing server-side CORS headers:

The G Web Development Software may find issues communicating with LabVIEW Web Services due to Cross-Origin Resource Sharing (CORS) configurations, to solve this error complete the next steps depending on the Web Server used to host the application.

When using the Application Web Server 

To solve this issue modify your LabVIEW Web Service and use the Set HTTP Header.vi to set the HTTP Header field, wire the Access-Control-Allow-Origin to the header input. You could specify the allowed domain on its own, or choose the value "*" to allow any domain, and wire it to the header value input. Using the asterisk, “*” to allow any domain has security implications that should be researched and reviewed before this solution is implemented.

image.png

When using the NI Web Server 

Use the NI Web Server Configuration tool on the machine hosting the web service to configure Cross-Origin Resource Sharing (CORS).
1. Open the application and go to the Remote tab.
2. In the Cross-Origin Resource Sharing (CORS) section select the Enable CORS for a list of trusted web servers option and specify the domain. You can also use the to allow any domain. As detailed in the last section using the asterisk to allow any domain has security implications that should be previously contemplated.
image.png
3. Click on Apply and restart to complete the changes.

After completing the changes run the G Web Development Software program to communicate with the LabVIEW Web Service.
 
  • Requesting to incorrect IP address:

If the CORS headers have been properly configured on the server side but the error persists, it may be due to an incorrect or malformed IP address.

When publishing a G Web application on a network for access by other clients, ensure that the localhost address (127.0.0.1) used during testing for HTTP Requests is replaced with its IPv4 address.

A common mistake occurs when the localhost address, used during testing to communicate with the web service on the same machine, is mistakenly left unchanged when deploying the application. This can result in error 363650, as external clients attempt to connect to their own local machines instead of the actual host. Ensure the correct network IP address of the host is specified before deployment to avoid this issue.

Additional Information

You can learn more about using Cross-Origin Resource Sharing outside of the LabVIEW context by looking at the Cross-Origin Resource Sharing (CORS) whitepaper by Mozilla.

 

Error 363650 in G Web also could occur if firewall has been blocked. Make sure to Configuring Software and Hardware Firewalls to Support NI Products.