G Web Development Software

cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP GET returns error 363650

Solved!
Go to solution

URL is working Okay in browser but returns empty 'body' and error code 363650 in G Web Development Software 2022 Q3

yura_beno_1-1660135994521.pngyura_beno_0-1660135896949.png

Any suggestions would be greatly appreciated

 

0 Kudos
Message 1 of 9
(8,122 Views)

Does the error status string have any helpful info? Likely causes for 363650 is CORS configuration issues. You're accessing the web service directly in the browser but accessing the G Web page from another host address which is then trying to access the web service data at 127.0.0.1 which is a different host address from the G Web access which triggers CORS security checks.

 

https://www.ni.com/docs/en-US/bundle/g-web-development/page/config-lv-web-service-cors-open-access.h...

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

yura_beno_0-1660203793729.png

Adding Access-Control-Allow-Origin * header doesn't seem to help, still generic error 363650 with random error location: HttpClientGet in NI::HTTP::httpWebServerClient.sli::httpWebServer_Get->NI::HTTP::GET.gvi->WebApp::YBB_02_Aug.gviweb

yura_beno_1-1660204041498.png

Configure CORS doesn't seem to do anything either... any ideas?

0 Kudos
Message 3 of 9
(8,044 Views)

Adding CORS to any origin (*) still gives 363650 and a random location string: HttpClientGet in NI::HTTP::httpWebServerClient.sli::httpWebServer_Get->NI::HTTP::GET.gvi->WebApp::YBB_02_Aug.gviwebyura_beno_1-1660216057631.png

 

Do I need to change any of these in http://localhost:3582/web-config

yura_beno_2-1660217371265.png

Thank you

0 Kudos
Message 4 of 9
(8,068 Views)

Also tried adding the built GWebVI to a public folder as suggested in Configuring CORS for a LabVIEW Web Service

Note: You do not need to enable CORS if your WebVI and LabVIEW Web Service have the same origin. To achieve this, host the built WebVI in the Public Content Folder of the LabVIEW Web Service the WebVI is making HTTP requests to when running your web application.

yura_beno_0-1660219890988.png

but still the same error, I must be missing something

0 Kudos
Message 5 of 9
(8,064 Views)

I'm hosting using IIS10 on Windows11 but that seem to work fine:

http://yuribeno.com/

0 Kudos
Message 6 of 9
(8,062 Views)

So you're pulling up the page on yuribeno.com but the G Web app is still trying to access the webservice via 127.0.0.1:8080 instead of a relative URI that will map to the same domain. When I open the page, 127.0.0.1 is MY machine and of course I don't have anything running.

 

Try using "/WebService1/HTTPMethod_1" as the URL for http client methods. Not specifying the authority portion of a URL (the host, port, and any basic auth info) is the recommended approach when everything is running via the same host.

Message 7 of 9
(8,054 Views)

Thank you for your help

/WebService1/HTTPMethod_1 stopped giving 363650

Now I get 404, the whole message is below and on yuribeno.com

yura_beno_0-1660286317362.png

Tried /HTTPMethod_1/ and other string combinations.

Still working okay in any browser:

yura_beno_2-1660286014871.png

I must be missing something very basic..

0 Kudos
Message 8 of 9
(8,031 Views)
Solution
Accepted by topic author yura_beno

Its working now www.yuribeno.com, had to properly forward the webservice port and use the public IP

yura_beno_0-1660438280143.png

Thank you

0 Kudos
Message 9 of 9
(7,990 Views)