You are not logged in.
Pages: 1
Thanx @mpv
Your hint helped to eliminates both error messages. Now my server application did not start, if it is not started with "run as administrator". This should help to prevent this problem in the future.
Yes, AB, I read the fuc.. manual ;-)
Yes, I called "CreateMissingTables". As I wrote, on serverside everthing works fine. I changed the default passwords "synopse" for all std. users (user, admin, supervisor). But regardless of "synopse" or new generated passwords, login (setUser) from client does not work for me using namedpipe or http connection. Everythings seems to be standard as expected.
On server side I recorgnized today two little messages, I do not understand why they occure, because I dont use services until now.
First message is: Exception of class EHTTPApiServer. Message 'HTTPSetServiceConfiguration failed: Access denied (5)
Second message after "continue" is: Exception of class EHTTPServerException. Message 'TSQLHttpServer: http.sys URI registration error #5 for http://+:8080/ (administrator rights needed). Same if I use a root path (http://+:8080/root).
I think, last time these messages arent there (I used today the latest available version from your website/nightlybuild).
Anyway, my basic problem still exists. Which sample shows the server and client side with authentication using .SetUser(...,...) as you mentioned?
I'm using mORMot on a server and a client. Now I implemented Authentication using TSQLAuthUser und TSQLAuthGroup.
From server side I can access all the users, add or delete them.
Now I liked to use this from client side. On Serverside I created:
aDB := TSQLRestServerDB.Create( aModel,
ChangeFileExt( ExeVersion.ProgramFileName, '.db3' ),
True ); //Authentication is active
On client side I created:
aClient:= TSQLRestClientURINamedPipe.Create( aModel,
cStrNamedPipeName );
Result := Assigned( aClient );
if( Result )
then Result := aClient.SetUser( sUserName, sPassword );
But the result of aClient.SetUser is always false. I started debugging and found out, that the first IF of "class function TSQLRestServerAuthentication.ClientGetSessionKey" is executed, not the ELSE. The resp of "Sender.CallBackGet('Auth',aNameValueParameters,resp)" includes "Errorcode":403 regardless if I use NamedPipe or HTTP client connection.
What is wrong with my code?
Hi
This is a total mORMot newbe question. Sorry :-) Also for probably ugly English :-|
Reading the documentation of the mORMot classes I wondered, why there is no possibility to define dynamic fields. Okay, it is possible to define them, but they can only be stored in a blob field (hope, I did not read over something). But this is not, what I like to do.
If I create an application using mORMot, it is very nice to define a class which fields are automatically "bind" to a SQL table (ORM). This is very helpful for application design, because this is not changeable by customers - we do not need to check, if they exist.
But today it is very interesting for customers to enhance an existing application by there needs. I think about an address application, as an example, where a person can be defined with address information such as Street, ZipCode, etc. This additional address data is stored in an extra db table, not in the person one (this can be done all by mORMot).
Now the customer needs for whatever reason 50 (or more) additional/individual fields, which should not be implemented in the standard application, but should be accessible as normal fields in the database tables (probably because of reporting requirements - ODBC,...). How can this be handled?
It should be possible to define one or more "empty" table definitions (classes), with no table columns (properties) in the standard application (better woud be if this could also be defined "dynamicly"). But what is about the fields? Ok, they could be created using SQL statements. But this is not the ORM model style.
If it is not possible - as I think actual - with the current version of mORMot, the following solution would be great.
Each class definition (for persistent datas in db - e.g. TSQLRecord) should have a property DynFieldDefs (like FieldDefs of TDataset) in the underlying base class, where additional fields can be defined. These definitions are stored in the destination database, where the corresponding table is in, for use when the structure of the model is beeing checked or rebuild.
Instead of reading the class property itself directly, the property DynFieldsDefs has to be used for it. Each object returned by this list can have a property .AsSting, .AsInteger, ... to get or write corresponding values to it (TIntFieldType, TStrFieldType, TVarFieldType, ...). Using a spezial methode (propably it already exists) the data model could be refreshed to update the database structure (directly at runtime, or later (yyyy.mm.dd hh.nn.ss)).
Am I wrong with my view of things, that this is missed in mORMot?
Pages: 1