TXDataServer URL access

Hi,

NOTE : my base app is your demo music located in TMS WEB Core Demos\XData\music

i've a web core app on my site megagest.it that try to access data to my local server where is a win TXDataServer application.
In my local PC i've a no-ip address http://ristord.ddns.net and web site i try to access to server with TXDataWebConnection
with this TXDataWebConnection.URL='http://ristord.ddns.net:80/DG/Auth' and TXDataWebConnection.Open(SuccessProc);

Server side in the project i've :

    AuthServers:=TObjectDictionary<string, TAuthServerModule>.Create([doOwnsValues]);
    AuthServers.Add('http://ristord.ddns.net:80/DG', TAuthServerModule.Create(Nil));
    AuthServers['http://ristord.ddns.net:80/DG'].StartAuthServer('http://ristord.ddns.net:80/DG', 'Auth');

and my procedures on server for Auth_ are same as your music demo in ... TMS WEB Core Demos\XData\music\XDataMusicServer

The problem : I can't access web side to server BUT in localhost go fine ! I've an 'at XMLHttpRequest.XhrError'. There are problem on no-ip address ?

I must set Header_AccessControlAllowOrigin, '*' ??

PS : Attached my server auth procedure (archive is RAR).

Auth_proc.zip (5.3 KB)
Thx

Do you see errors in the browser console and if so, what errors?

ERROR
Uncaught TypeError: Cannot read property 'FCSSLibrary' of null | TypeError: Cannot read property 'FCSSLibrary' of null at Object.MessageDlg (http://www.megagest.it/Ristord/Ristord_1_0_1015.js?v=2:31529:53) at Object.conDBError (http://www.megagest.it/Ristord/Ristord_1_0_1015.js?v=2:87742:29) at Object.cb [as FOnError] (http://www.megagest.it/Ristord/Ristord_1_0_1015.js?v=2:242:19) at Object.DoError (http://www.megagest.it/Ristord/Ristord_1_0_1015.js?v=2:48430:14) at LocalError (http://www.megagest.it/Ristord/Ristord_1_0_1015.js?v=2:48462:17) at XMLHttpRequest.XhrError (http://www.megagest.it/Ristord/Ristord_1_0_1015.js?v=2:48610:32)
at http://www.megagest.it/Ristord/Ristord_1_0_1015.js?v=2 [31529:53]

I can only suspect this must be the result of an incorrect install.
Can you make sure to do a full uninstall of TMS WEB Core first via the Windows Control Panel Add/Remove software. Then verify TMS WEB Core does not longer appear in your Delphi IDE and then perform an install on a clean Delphi IDE?

I can only suspect this must be the result of an incorrect install.
No bruno, because before install new ver of tms web core problem was same with old ver 1.5
I think is an address resolution problem (because is a no-ip) or server reject an "anonymous" address !
The TRejectAnonymousAccessMiddleware.ProcessRequest( never fire in Auth_Module.pas i sent you on Zip file.
If you want i can pass you entire web project and server

Bye

We couldn't open your zip file. Can you please review and send it in a "standard zip format"?

i said is a rar :) (just change in .rar) i suggest to add rar type in a upload options files

Ok, thanks. We ask for zip files only.

Well, the app is missing lots of files, so it can't be compiled or run. Even with the files provided, the source code is huge, I don't even know where to start. I don't see any reference to FCSSLibrary in your code.

Please try to reduce your project to a minimum compilable size that can reproduce the problem and can be execute at our side.

EntityTest.zip (157.0 KB)

Try this sample.... If you note in the server side i've XDataServer.BaseUrl:='http://ristord.ddns.net:80/tms/xdata'; in the client : DataConnection.URL:='http://ristord.ddns.net:80/tms/xdata';
Now try to run server on your PC and run on my site web www.megagest.it/Test/Enty_Client.html
You must create a no-ip address (ristord.ddns.net) or try with your pubblic IP address
At the end i must access from web site to my local data (personal PC:) with a no-ip addreess. I can ?

ERROR
XDataConnectionError: Error connecting to XData server | fMessage::XDataConnectionError: Error connecting to XData server FJSError::Error: XDataConnectionError: Error connecting to XData server fHelpContext::0
at http://www.megagest.it/Test/Enty_Client_1_0_144.js?v=2 [48421:13]

Have you enabled CORS in your XData server? What error messages you see in the browser console?

Solved : was noip address used on flat phone sim that is limited. I tried it on fixed router and go fine.
Thx

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.