datasnap

Delphi Datasnap Server User Authentication

泪湿孤枕 提交于 2019-12-06 15:16:20
问题 We are developing a new, and our first, DataSnap server and client apps. I have added authentication to the server but I cannot dynamically change the login details for the connection from the client. The User and Password in the procedure TServerContainer1.DSAuthenticationManager1UserAuthenticate( Sender: TObject; const Protocol, Context, User, Password: string; var valid: Boolean; UserRoles: TStrings); stays blank. In the client we set the values as such ... DSConnection := TSQLConnection

Which midas.dll to use? 32bit datasnap/64bit server

痞子三分冷 提交于 2019-12-06 14:16:00
Considering the following: We have a 32 bit Datasnap server installed on a 64 BIT Windows Server In embarcadero\rad studio\11.00\redist are 2 folders : 32 bit and 64 bit, with in each a midas.dll. Wich file should we put where? In windows\system32 or windows\syswow64 ? Never put anything in the Windows system directories (unless you have a very, very, very good reason to write there). It's a very bad practice (dating back to Windows 3.x times and poor developers skills, because those dirs are always in the search path) just leading to troubles (i.e. if another application chnages your DLL with

Post JSON data to RESTful datasnap server from delphi client

时间秒杀一切 提交于 2019-12-06 11:28:31
I need to send a simple JSON object to a Restful datasnap server (Delphi) from a Delphi client. I am using Delphi XE. Can anybody help me out with the code? I am trying for hours but not getting it.. Please ask if details are not sufficient Edit: Here is server side method declaration: procedure updatemethodnme(str:string):string; and here is client side code: function PostData(request: string): boolean; var param: TStringList; url, Text,str: string; code: Integer; http: TIDHttp; begin Result:= false; http:= TIDHttp.Create(nil); http.HandleRedirects:= true; http.ReadTimeout:= 50000; http

DUnit Testing in a Midas/DataSnap project

怎甘沉沦 提交于 2019-12-06 10:42:51
问题 How does one setup DUnit Testing in a Midas/DataSnap project in Delphi 2006 Edit How does one set up a Dunit Test into a TRemoteDataModule The project wizard in Delphi 2006 does not work with TRemoteDataModule 回答1: The question doesn't entirely make sense. Unit tests are performed in a separate project, not within your DataSnap server. Generally, tests which connect to a database are integration tests rather than unit tests. What is it, exactly that you want to test? If it's utility methods

How can I create/install a SSL Cert for a standalone Datasnap Rest Server on local network

狂风中的少年 提交于 2019-12-06 10:13:28
问题 I am new to SSL and Certificate procurement and this is the first datasnap server I have tried to make using https/ssl. I have a stand alone Datasnap server (XE4) and I want to create or obtain a SSL that I can use with it so that my rest communications are encrypted. There is nothing but an IP address associated with the computer running this server. How can I obtain a suitable SSL? Can I purchase a cert that would work with an ip address? eventually I want to use port forwarding to deliver

Most efficient way to pass SQL Login credentials to Delphi Datasnap servers?

寵の児 提交于 2019-12-06 03:59:27
问题 Using Delphi XE to build a relatively straightforward database app using Datasnap. Since some security in my application is handled at the database level, I need to pass a user's SQL credentials from my client app to my Datasnap server. (I'm trying to make the Datasnap server stateless if possible, so recognise that I will have to do this for every call.) I'm using ClientDatasets (CDS) on the client side so I could use OnBeforeGetRecords to pass the data in the OwnerData OleVariant from the

Return an image from a Delphi REST server and show it in a browser

笑着哭i 提交于 2019-12-05 23:52:00
问题 When you return an image using a file stream object in a Delphi rest server, it will not display in a browser. Here is an example method that returns an image: function TServerClass.Image: TFileStream; begin Result := TFileStream.Create('pathtofile\image.png', fmOpenRead or fmShareDenyNone); end; 回答1: The problem is that Delphi REST server always sets the content type to text/html. This confuses the browser when you send other types of content. It is a bug, since most responses are json,

How do I get a stack trace from a handled/caught exception and dump it to a trace log

做~自己de王妃 提交于 2019-12-05 17:22:38
We've created a Datasnap service (with Delphi XE), using Bob Swart's white paper as a guide. It works fine, and we've deployed it to our test server. Now a problem occurs, when we have executed a large number of requests (through JMeter), some sort of memory corruption occurs. Some requests succeed, some fail with an access violation. In the end, it has become so corrupt, that every request to our OWN (not the DSAdmin) methods responds with an access violation. However, I can't get my hands on a stacktrace to get more info, because the exception is already catched in the processing of the

How can I supress Delphi DataSnap error message dialogs?

佐手、 提交于 2019-12-05 10:23:20
We run a DataSnap Delphi 2009 application on Windows 2003 Server. DataSnap Client and Server are on the same computer, using DCOM over Borland Socketserver. The client runs a background batch job. Sometimes, we discover that the client can not connect to the server application and displays a message dialog on the server desktop indicating for example "Could not connect to server. Network path could not be found." or "Objectexporter not found." Our Delphi client code never uses a message dialog to show errors or exceptions, instead we use try ... except .. finally ... end and logging to handle

Delphi Datasnap Server User Authentication

大城市里の小女人 提交于 2019-12-04 20:45:42
We are developing a new, and our first, DataSnap server and client apps. I have added authentication to the server but I cannot dynamically change the login details for the connection from the client. The User and Password in the procedure TServerContainer1.DSAuthenticationManager1UserAuthenticate( Sender: TObject; const Protocol, Context, User, Password: string; var valid: Boolean; UserRoles: TStrings); stays blank. In the client we set the values as such ... DSConnection := TSQLConnection.Create(nil); DSConnection.DriverName := 'DATASNAP'; DSConnection.LoginPrompt := False; DSConnection