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

Updated Sep 15, 2023

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

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.

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.