Gadgeteer Web Server and "Streaming of embedded resources"

when you compute the content length, you should replace


contentLenght += blockSize;

by


contentLenght += resourceBlock.Length;

because, if the very last read buffer is less than blocksize, you do not take in account !!

@ LouisCpro - Good catch!!!

NOW IT WORKS even in Chrome :wink: before didn’t work! MANY THANKS… may it be i can propose a patch over the Gadegeer web server…

otherwise for who is interested in a web server that can “stream” big entities from an embedded resources… feel free to ask me!

You’re welcome :dance:

How did you generate the XAP File ?

it s a silverlight app… i build and copy to the location of the embedded resource… then recompiling the mf source an deployng it i’ve inside my device… so my small microframework device expose a nice silverlight application for the configuration and the visualization ui!

better that become crazy service tons of HTML files… :wink: and it’s managed code!!! :wink:

Amazing !

I’ll try that ASAP…

@ LouisCpro - happy to see that seems a good solution!

For me it’s the best! a very smart UI !!! it didn’t work on mobile phones… but for that target a dedicated application will be done!.. no? using the same XML endopoint used by the SL app! ehhehe

So you imagine a SL Engine for Mobile ? Maybe it has been done in Windows Phone 8 ?

If you can forward the version with XAP, I could make some tests on my WPhone…

@ LouisCpro - wait… for windows phone i con reuse 80% of the code from the standard silverlight desktop application! as it is…

for android and ios i con just sue the same logic and end point… where with end point i mean the web services exposed by the dadget…

@ LouisCpro -

the xap is just an empty sl application

<Grid x:Name="LayoutRoot" Background="Green">
    <sdk:Label Height="Auto" HorizontalAlignment="Left" Margin="10,10,0,0"
               Name="label1" VerticalAlignment="Top" Width="Auto"  Content="Welcome to BIFOLC UI"/>
    <Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="398,115,0,0" Name="button1" VerticalAlignment="Top" Width="75" />
</Grid>

OK !

I guess you will be interested by this (if you did not already knows) :

http://www.tinyclr.com/forum/topic?id=10200

Interesting… unfortunatelly i cannot be in naples such days