Sending data from RequestDone event - WeOnlyDo Discussion board

Sending data from RequestDone event (wodWebServer / wodWebServer.NET)

by Vesku, Thursday, January 13, 2011, 23:39 (4849 days ago)

Hi,

Is there a limit when sending data with Send? When limting amount of data, it works.

br,
Vesku

Sample code:
e.user.Response.Delivery = WODWEBSERVERLib.DeliveryEnum.Manual
e.user.Response.TransferEncoding = WODWEBSERVERLib.TransferEncodingsEnum.ChunkedEncoding
Dim DS As New DataSet
DS.Tables.Add(SongsDataView.ToTable())
xmlString = DS.GetXml()
e.user.Response.SendChunk(xmlString)
e.user.Response.Send()

Re: Sending data from RequestDone event

by woddrazen, Friday, January 14, 2011, 00:06 (4849 days ago) @ Vesku

Hi Vesku,


Is there any reason why you cannot send data when Delivery is set to Automatic?


Regards,
Drazen

Re: Sending data from RequestDone event

by Vesku, Friday, January 14, 2011, 06:38 (4849 days ago) @ woddrazen

Hi Drazan,


No reason, but it works same way

Re: Sending data from RequestDone event

by woddrazen, Friday, January 14, 2011, 09:13 (4849 days ago) @ Vesku

Vesku,


Why don't you then use Delivery = Automatic and leave wodWebServer to do this automatically?


Drazen

Re: Sending data from RequestDone event

by Vesku, Friday, January 14, 2011, 09:40 (4849 days ago) @ woddrazen

Unfortenately automatic setting seems not to work. Maybe the problem is in that variable(size exceeded).

I'll have to study this coming weekend.

br,
Vesku

Re: Sending data from RequestDone event

by woddrazen, Friday, January 14, 2011, 10:26 (4849 days ago) @ Vesku

Vesku,


There shouldn't be any limit inside SendChunk Method. Did you maybe check our 9. Chunked response VB sample? You can find that sample inside component Samples folder.

Let us know if you need more help.


Drazen

Re: Sending data from RequestDone event

by Vesku, Saturday, January 15, 2011, 12:51 (4848 days ago) @ woddrazen

Hi Drazen,

The size of the variable is 374 kB. If save it as a file, automatic-mode can send it. I would not like to do this via file.

So smaller variable works, so could there be limit like 256 kB in SendChunk?

br,
Vesku

Re: Sending data from RequestDone event

by Vesku, Saturday, January 15, 2011, 14:52 (4848 days ago) @ Vesku

Hi Drazen,

I iterate the limit. 198 kB seems to be it.

I use now also automatic mode, so the limit is with ChunkSend. As you see, I'm to to create XML data to client directly from dataset (rest-api) and it would be easy to provide the data in on large chunk.

br,
Vesku

Re: Sending data from RequestDone event

by woddrazen, Saturday, January 15, 2011, 17:55 (4847 days ago) @ Vesku

Vesku,


This seems to worked for me without any problem. I managed to send 424 KB using only one SendChunk.

Is there any chance you can send us email to techsupport@weonlydo.com ? If you wish I can send you my example there.


Drazen

Re: Sending data from RequestDone event

by Vesku, Sunday, January 16, 2011, 09:54 (4847 days ago) @ woddrazen

Ok, I'll do that. I'm interest to see what i'm doing incorrectly...
br, Vesku