You are not logged in.
Pages: 1
Hi AB i tried to connect an universal firemonkey Client to one of my mORMot Servers but the connection was refused.
i found this article: http://synopse.info/forum/viewtopic.php?id=1976
it seems to have the same Problem.
Under normal Windows Client this code works to connect to the Server:
CompressShaAesSetKey('xyz');
FDatabase := TSQLHttpClient.Create(Server,APort,FModel);
FDatabase.Compression := [hcSynShaAes];
FDatabase.SetUser('User','synopse');
on Server Side i register the Database with this code:
DB := TSQLRestServerDB.Create(Model,AppPath + 'database.db3',true);
AddToServerWrapperMethod(DB, ['..\..\..\CrossPlatform\templates']);
CompressShaAesSetKey('xyz');
Server := TSQLHttpServer.Create('5001',[DB],'+',useHttpApiRegisteringURI, 32, secSynShaAes);
How can i connect to this Server with the generated code ?
atm i'm using:
Client := GetClient('myurl.url', 'user', 'synopse');
Have i to remove the encryption on Server Side ?
I think best way would be to generate code which could connect automatically.
Last edited by itSDS (2014-09-09 06:35:40)
Rad Studio 12.1 Santorini
Offline
It should work even with hcSynShaAes.
In fact, this hcSynShaAes encryption is not mandatory: it is used if both sides do support it.
If the client does not support hcSynShaAes (like one of our CrossPlatform client), it won't just use it.
So the issue is somewhere else.
Are you sure you can connect to the server?
Is the port 5001 open on your Windows firewall?
Can you connect via http, using plain browser, to the server URI, from the mobile?
Online
sry ab i found the Error: SetUser is case sensitive and i wrote user not User as username
Last edited by itSDS (2014-09-09 08:48:29)
Rad Studio 12.1 Santorini
Offline
IDEA:
May be i could have found my error easier if the error was not "bad request".
Is it possible to give error Messages like "unknown user", or "wrong password" ?
Rad Studio 12.1 Santorini
Offline
Are you sure it is not already the case in the transmitted JSON?
In all cases, thanks for your feedback, since I do not own any iPhone so I was not able to fully test this mobile platform.
8)
Online
The Server reply is:
{
"ErrorCode":400,
"ErrorText":"Bad Request"
}
Rad Studio 12.1 Santorini
Offline
Pages: 1