I have an XData Aurelius server running at a remote customer site. I can connect via a web core app that is running on the same machine (IIS in Windows 2019) as the XData server at the customer's site. I can also access the data from web browsers running locally on my office computers.
But I cannot connect when running that web core app locally. I have no problem connecting the XDataWebConnection and XDataWebSet in the IDE. I can import fields and everything works in the IDE. But when I try to connect from the web core app, it will not connect and when I check it reports connected as false.
Since I could not get a connection, I decided to use the "TMS XData Web Application" wizard to further confirm the problem. I provided the server address as https://my.server.com:443/xdata/renewals and tested the connection. This worked fine and the wizard built the app. I corrected an error in the wizard (AuthConnection should be APIConnection) and ran the app locally. I got this message:
"Oops... an error occurred!
Error connecting to XData server: https://my.server.com:443/xdata/renewals/$model
This same url works correctly in my browsers (chrome and edge).
I am running XData 22.214.171.124, Sparkle 126.96.36.199, Aurelius 188.8.131.52, Biz Core 184.108.40.206, and Web Core 220.127.116.11.
Why are my connections working in my local browsers, my local IDE, and in the web app on the remote machine but not connecting when running the app locally?
Please open the browser console for more information about the error. I suspect it's a CORS issue (the browser console will confirm it). If that's the case you should modify your XData server adding the CORS middleware to TXDataServer component to allow connections from web applications hosted in a different host than the server itself.