RTC Forums

Subscription => Support => Topic started by: markh51 on December 06, 2009, 10:24:35 PM



Title: Passing RtcInfo from client to server
Post by: markh51 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.


Title: Re: Passing RtcInfo from client to server
Post by: markh51 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.


Title: Re: Passing RtcInfo from client to server
Post by: DonR on December 09, 2009, 11:10:01 PM
On the client try:
Request.Info.asString['ID'] := 'TestId';

On the server try:
Request.Query['ID']


Title: Re: Passing RtcInfo from client to server
Post by: zsleo 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.



Title: Re: Passing RtcInfo from client to server
Post by: markh51 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.


Title: Re: Passing RtcInfo from client to server
Post by: DonR on December 10, 2009, 09:23:21 PM
Sorry, It should have been Request.Query['ID'] on both client and server.


Title: Re: Passing RtcInfo from client to server
Post by: markh51 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 ?


Title: Re: Passing RtcInfo from client to server
Post by: SteveM 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:

Code:
  IF Srv.Request.Method = 'POST' THEN
    Srv.Request.Params.AddText(Srv.Read);

in your DataReceived handler to get access to the params.

Steve...


Title: Re: Passing RtcInfo from client to server
Post by: markh51 on December 11, 2009, 07:26:24 PM
We use the GET method...


Title: Re: Passing RtcInfo from client to server
Post by: zsleo 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.


Title: Re: Passing RtcInfo from client to server
Post by: kaju74 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


Title: Re: Passing RtcInfo from client to server
Post by: zsleo on December 22, 2009, 12:08:09 PM
Kaju

I sent you a private message some days ago.

Please review and reply


Title: Re: Passing RtcInfo from client to server
Post by: markh51 on December 22, 2009, 11:54:54 PM
Yes, it would be good if you code post some code...


Title: Re: Passing RtcInfo from client to server
Post by: zsleo 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


Title: Re: Passing RtcInfo from client to server
Post by: D.Tkalcec (RTC) 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