markh51
Guest
|
|
« on: December 06, 2009, 10:24:35 PM » |
|
I am attempting to use the RtcDataProvider and RtcDataRequest components to download files from our server. We have a service running on the server which is the RtcDataProvider which will allow us to download files. I am attempting to pass some data inside the RtcInfo to the server so it can validate the user, but the server never sees this data, it is always null.
I am doing:
Request.Info['ID'] := 1; Post;
on the client.
and on the server I try to get the data inside the Request.Info['ID'] but it is always null.
Can someone point me in the right direction ? I have tried to put the "Request.Info['ID'] := 1" line in various places in the client, but nothing seems to work.
Thanks.
|
|
|
Logged
|
|
|
|
markh51
Guest
|
|
« Reply #1 on: December 09, 2009, 10:22:06 PM » |
|
It seems like it can not be done, but since there is little or no help unless you pay for it, I cant be 100% sure.
|
|
|
Logged
|
|
|
|
DonR
Newbie
Posts: 3
|
|
« Reply #2 on: December 09, 2009, 11:10:01 PM » |
|
On the client try: Request.Info.asString['ID'] := 'TestId';
On the server try: Request.Query['ID']
|
|
|
Logged
|
|
|
|
zsleo
RTC Expired
Posts: 80
|
|
« Reply #3 on: December 09, 2009, 11:19:07 PM » |
|
Also, in the Demos folder look at all demo projects that use the rtcFileProvider unit. Once you understand those you will have no problems.
if you are transfering large files Danijel has published two excellent articles in the "RTC SDK Quick Start" section - Server Lesson 3 and Server Lesson 4.
|
|
|
Logged
|
|
|
|
markh51
Guest
|
|
« Reply #4 on: December 10, 2009, 10:43:20 AM » |
|
DonR, thanks for the help, but it does not work either. It seems to me that the Info structure is not passed when sending the headers. As I have tried many ways and it is always null on the other side.
zsleo, I have looked at the demo projects and the quick start quide as I am indeed sending large files, so I used the code for ideas. However, it does not show, or at least I can not see anything that shows how to send your own data using the info structure or any other method.
If anyone can point me to the demo which does, then please do. I have been at this for days now.
|
|
|
Logged
|
|
|
|
DonR
Newbie
Posts: 3
|
|
« Reply #5 on: December 10, 2009, 09:23:21 PM » |
|
Sorry, It should have been Request.Query['ID'] on both client and server.
|
|
|
Logged
|
|
|
|
markh51
Guest
|
|
« Reply #6 on: December 10, 2009, 10:11:09 PM » |
|
DonR, yes that works ok as so does Request.AsString['ID'].
However I noticed, that both of these methods only allow strings, whereas the Info structure allows many types of data. Is there no way to use the Info structure ?
|
|
|
Logged
|
|
|
|
SteveM
|
|
« Reply #7 on: December 11, 2009, 06:38:38 PM » |
|
Might have nothing to do with it, but what method (GET/POST) are you using at the client end? If POST bear in mind you'll need to do something like: IF Srv.Request.Method = 'POST' THEN Srv.Request.Params.AddText(Srv.Read);
in your DataReceived handler to get access to the params. Steve...
|
|
|
Logged
|
Stephen Mott - Lanboss Software
|
|
|
markh51
Guest
|
|
« Reply #8 on: December 11, 2009, 07:26:24 PM » |
|
We use the GET method...
|
|
|
Logged
|
|
|
|
zsleo
RTC Expired
Posts: 80
|
|
« Reply #9 on: December 15, 2009, 12:07:18 AM » |
|
I have used these methods for an app update project now deployed on more than 30 sites with file sizes between 1.5 MB and 7MB - so I know it works.
If you are still having the problem, I will post extract client and server code here in the next few days.
|
|
|
Logged
|
|
|
|
kaju74
Newbie
Posts: 25
|
|
« Reply #10 on: December 16, 2009, 02:23:26 PM » |
|
@zsleo: This would be cool. I also need an update mechanism for my app...and why not using RTC So if you have some interesting codeparts... Thank you, kaju
|
|
|
Logged
|
|
|
|
zsleo
RTC Expired
Posts: 80
|
|
« Reply #11 on: December 22, 2009, 12:08:09 PM » |
|
Kaju
I sent you a private message some days ago.
Please review and reply
|
|
|
Logged
|
|
|
|
markh51
Guest
|
|
« Reply #12 on: December 22, 2009, 11:54:54 PM » |
|
Yes, it would be good if you code post some code...
|
|
|
Logged
|
|
|
|
zsleo
RTC Expired
Posts: 80
|
|
« Reply #13 on: December 23, 2009, 02:43:31 AM » |
|
The point I was making is that I have a small project that may not be appropriate to place in thei forum.
I will try t attach it in a forum private email to you
|
|
|
Logged
|
|
|
|
D.Tkalcec (RTC)
|
|
« Reply #14 on: January 21, 2010, 11:35:19 AM » |
|
The "info" property (TRtcInfo type) is a temporary local data storage and is never sent.
Best Regards, Danijel Tkalcec
|
|
|
Logged
|
|
|
|
|