G Web Development Software

取消
显示结果 
搜索替代 
您的意思是: 

HTTP GET returns error 363650

已解决!
转到解答

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 项奖励
1 条消息(共 9 条)
9,732 次查看

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 项奖励
2 条消息(共 9 条)
9,713 次查看

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 项奖励
3 条消息(共 9 条)
9,654 次查看

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 项奖励
4 条消息(共 9 条)
9,678 次查看

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 项奖励
5 条消息(共 9 条)
9,674 次查看

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

http://yuribeno.com/

0 项奖励
6 条消息(共 9 条)
9,672 次查看

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.

7 条消息(共 9 条)
9,664 次查看

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 项奖励
8 条消息(共 9 条)
9,641 次查看
解答
已被主题作者 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 项奖励
9 条消息(共 9 条)
9,600 次查看